I am trying to start a server using CreateProcess(). Here is the Code:
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
int result;
STARTUPINFO si;
PROCESS_INFORMATION pi;
CreateProcess("C:\\AP\\DatabaseBase\\dbntsrv.exe", "*** WHAT SHOULD I PUT HERE***", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
return 0;
}
I did not understand from the documentation what the 2nd parameter should be. Can you please help me with it? Thank You
You can check this link.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx there is thoroughly explained about that argument
From MSDN:
So
NULL
is OK there, at least. As soon as you don't pass arguments.You use it to pass arguments to the .exe defined by the first parameter:
An example would be to call the cmd.exe and then run a script or use a zip utility: