|
-
June 22nd, 2008, 08:40 AM
#1
CreateProcess with Vista, How to?
Hi, I have a following code worked fine with XP or W2K.
The Alibre.exe was launched.
But this does not apply with Vista, any other API available with Vista?
Thank you.
Code:
//if( !CreateProcess( L"C:\\Program Files\\Alibre Design\\alibre.exe", // No module name (use command line)
if( !CreateProcess( lpPath, // No module name (use command line)
NULL, // Command line
NULL, // Process handle not inheritable
NULL, // Thread handle not inheritable
FALSE, // Set handle inheritance to FALSE
0, // No creation flags
NULL, // Use parent's environment block
NULL, // Use parent's starting directory
&si, // Pointer to STARTUPINFO structure
&pi ) // Pointer to PROCESS_INFORMATION structure
)
{
return;
}
// Wait until child process exits.
WaitForSingleObject( pi.hProcess, 2000 );
// Close process and thread handles.
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
hr = GetActiveObject (clsid, NULL, &pUnk);
while(FAILED (hr) ){
Sleep(2000);
hr = GetActiveObject (clsid, NULL, &pUnk);
}
}
-
June 22nd, 2008, 08:44 AM
#2
Re: CreateProcess with Vista, How to?
Read the following: http://forums.microsoft.com/MSDN/Sho...22705&SiteID=1
[amazing what happens when you go to MSDN and search for "CreateProcess Vista"
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|