Hi all,
When running the following I recieve an unhandled exception error - I am running against the Unicode character set, could this be causing the error?
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = NULL;
HANDLE hStdoutRd, hStdoutWr, hStdinRd, hStdinWr;
CreatePipe (&hStdoutRd, &hStdoutWr, &sa, 0);
SetHandleInformation(hStdoutRd, HANDLE_FLAG_INHERIT, 0);
CreatePipe (&hStdinRd, &hStdinWr, &sa, 0);
SetHandleInformation(hStdinWr, HANDLE_FLAG_INHERIT, 0);
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi;
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdOutput = hStdoutWr;
si.hStdInput = hStdinRd;
if(!CreateProcess (NULL, (LPWSTR)"c:\php\php-cgi.exe", NULL, NULL, TRUE,CREATE_UNICODE_ENVIRONMENT | NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi))
{
printf( "CreateProcess failed (%d)\n", GetLastError() );
}
I recieve an unhandled exception:
Unhandled exception at 0x00479986 in WebserverTest.exe: 0xC0000005: Access violation reading location 0x00000274.
Any ideas as to what this could be?
Help appreciated - cheers people!
When running the following I recieve an unhandled exception error - I am running against the Unicode character set, could this be causing the error?
SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES) };
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = NULL;
HANDLE hStdoutRd, hStdoutWr, hStdinRd, hStdinWr;
CreatePipe (&hStdoutRd, &hStdoutWr, &sa, 0);
SetHandleInformation(hStdoutRd, HANDLE_FLAG_INHERIT, 0);
CreatePipe (&hStdinRd, &hStdinWr, &sa, 0);
SetHandleInformation(hStdinWr, HANDLE_FLAG_INHERIT, 0);
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi;
si.dwFlags = STARTF_USESTDHANDLES;
si.hStdOutput = hStdoutWr;
si.hStdInput = hStdinRd;
if(!CreateProcess (NULL, (LPWSTR)"c:\php\php-cgi.exe", NULL, NULL, TRUE,CREATE_UNICODE_ENVIRONMENT | NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi))
{
printf( "CreateProcess failed (%d)\n", GetLastError() );
}
I recieve an unhandled exception:
Unhandled exception at 0x00479986 in WebserverTest.exe: 0xC0000005: Access violation reading location 0x00000274.
Any ideas as to what this could be?
Help appreciated - cheers people!