Hello,
Im still at the beginnig of C, some things goes very well, and Im learning every day more...
Now, I have a problem, where I cannot find any answers. Not really in MSDN, here or google, so I hope someone can healp me.
I will writing an application for a WINCE Device (PNA).
This is my "basic"-code (test.exe):
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
/** Prototypes **************************************************************/
/** Global variables ********************************************************/
/****************************************************************************
*
* Function: WinMain
*
****************************************************************************/
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpszCmdLine, int nCmdShow)
{
MessageBox(NULL,TEXT("Hello World"),TEXT("Test"),MB_OKCANCEL);
return 0;
}
It shows me a messagebox an exit after clicking OK or CANCEL.
I want to call this ap with parameters e.g.
test.exe "parameter1" "parameter2" where parameter1 = \My Flash Disk\test2.exe
Instaed of the messagebox I will do something like:
CreateProcess(parameter1,NULL,0,0,FALSE,0, 0, 0, NULL, NULL);
I found something with arc and argv in MSDN:
int main( int argc, // Number of strings in array argv
char *argv[], // Array of command-line argument strings
char *envp[] ) // Array of environment variable strings
but I dont know how to use this exactly.
Michael