|
How can I configure visual studio 2005 so that if I create a windows API application, it would run on windows xp system that does not have any .net framework installed. With visual c++ 6, this problem does not occur but with visual studio 2005, the application can run only when .net framework is installed on the user's system. How can I configure visual studio 2005 to avoid such problem. Please help.
|
|
|
|
|
Which type of Windows application are u making?? MFC application or CLR application?? For standard MFC application you need to install Visual C++ runtime libraries and for standard CLR application .NET is required. Compiling MFC application by static linking may avoid the need to install C++ runtime libraries. A way to avoid libraries for VC++ can be found here[^]>. This method may be tried in VC++ 2005
modified on Sunday, May 3, 2009 11:16 AM
|
|
|
|
|
The application was programmed neither as MFC nor CLR but rather, in the old style of Win32 API Programming (Windows Application). A typical Win32 application is a very short application shown below.
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "I want to make configurations to Visual Studio 2005", "Help", MB_ICONINFORMATION)
return 0;
}
The above application, if compiled with Visual Studio 2005 (VC++ 2005) does not run on a system running windows that does not have .net framework installed. The system reports that the application configuration is incorrect, and that the application needs to be reinstalled.
However, the same application if compiled with VC++ 6 can run on any system running windows that does not have .net framework installed on it. It can even run on Vista, which I have tried myself. I need to make this configuration so that the application does not require .net framework before it runs.
|
|
|
|
|
You can either statically link your application to the C-runtime libraries or install the VC redistributable package on the target computer. This executable can be found here[^].
By the way, this is not the .NET framework which is required but the C-runtime libraries.
|
|
|
|
|
how can i generate a file of my program after a specific time mean i keep do use my program but in the back after suppose 2 min its automatically creat file
|
|
|
|
|
Wouldn't you just use SetTimer and then either provide a pointer to the callback function or just handle WM_TIMER messages in the main window function?
|
|
|
|
|
In addition to SetTimer() , check out CreateTimerQueueTimer() .
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I want to know how to convert a process handle to the process id.
is it possible?
|
|
|
|
|
Do you need to GetProcessId ?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
GetProcessId, i do need it someone has told me about it , but in the msdn
i can't find any document of this api,why? can this api be used in xp?
|
|
|
|
|
|
in msdn oct 2001 ,this function is not documented.why?
|
|
|
|
|
Um, er, ah, Just to hazard a guess -
Minimum supported client is WinXP SP1.
XP SP1 was released on Sep 9 2002, not quite sure how it would make it into the MSDN that was released 11 months prior.
Well, that's my uneducated take on it anyway...
The thing I'm curious about, is why you would want to know how to (a)hide your program from the task-manager programs list and (b) how to get a processId.
Me wonders if you aren't producing a piece of malware?
modified on Sunday, May 3, 2009 9:39 AM
|
|
|
|
|
i am not producing a malware.I work on a office lan control app.I don't want the employee to stop my client part.so i need these technics.
thank you to your help.
|
|
|
|
|
tyr2000 wrote: office lan control app
Well, that sounds like malware to me
|
|
|
|
|
I am using templates for a class for the first time and I cannot figure out what I am doing wrong.
Any help would be greatly appreciated.
This code will generate LNK2019 Unresolved External
AssocArray<Vector3> myArray;
Class Definition
template <class TValue>
class AssocArray
{
public:
AssocArray();
AssocArray(int size, int resizeBy);
int GetCount() { return m_nItems; }
void SetNewSize(int size, bool copy = true);
void IncreaseSize(int size, bool copy = true);
TValue operator [](int i);
TValue operator [](string s);
private:
int m_nItems;
int m_nMaxItems;
int m_nResizeBy;
KeyValuePair<string, TValue>* m_array;
};
Class Constructor
template <class TValue>
AssocArray<TValue>::AssocArray()
{
m_nItems = 0;
m_nMaxItems = 2;
m_nResizeBy = 2;
m_array = new KeyValuePair[2];
}
modified on Sunday, May 3, 2009 5:28 AM
|
|
|
|
|
What's the exact error that is displayed on Output window???
|
|
|
|
|
Error 1 error LNK2019: unresolved external symbol "public: __thiscall AssocArray<class Vector3>::AssocArray<class Vector3>(void)" (??0?$AssocArray@VVector3@@@@QAE@XZ) referenced in function "public: void __thiscall EngineRoot::InitializeLater(void)" (?InitializeLater@EngineRoot@@QAEXXZ) EngineRoot.obj
Error 2 fatal error LNK1120: 1 unresolved externals
modified on Sunday, May 3, 2009 9:39 PM
|
|
|
|
|
Is the constructor in the same file as the class definition? (Hint: it isn't.)
(If you're wondering why it doesn't give you a compilation error, it's because the compiler doesn't know if you have a class template specialization defined somewhere.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Constructor and all member functions are in a separate file to the definition.
There is no template specialization in the code.
|
|
|
|
|
That's my point; put everything into one file. By their nature, template classes are nothing but definition.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thank you, that has solved the problem
|
|
|
|
|
Help,is anyone who can tell me how can I change the height of the item in the list control????
|
|
|
|
|
See here[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Sure.
Do a search and find some code that implements a custom list control. Look through the source
until you find code that alters the height of each item. Copy this code and apply appropriately.
Something else you may consider: LPNMCUSTOMDRAW & WM_NOTIFY
|
|
|
|