|
-
August 10th, 2009, 10:55 AM
#1
How to execute 16 bit process via CreateProcess
Hi Everyone,
I am unable to execute a 16 bit process from 32 bit process via CreateProcess. I am getting this error
'Error while setting up environment for the application. Choose Close to terminate the application.'
Here is my code
STARTUPINFO si;
memset( &si, 0, sizeof(STARTUPINFO) );
::GetStartupInfo( &si );
PROCESS_INFORMATION pi;
BOOL bRet = ::CreateProcess( NULL,
"C:\\ZTOOLS\\ZIMAGLIT.EXE Untitled.pcx Untitled.grf Untitled.GRF",
NULL,
NULL,
TRUE,
CREATE_NO_WINDOW|CREATE_SEPARATE_WOW_VDM,
::GetEnvironmentStrings(),
"C:\\ZTOOLS",
&si,
&pi );
Also here, I need to set the current directory to the one where the 16 bit process resides. In this case, I set it to "C:\Ztools".
I need to run the process through this function only because the process generates some files which I had to read when the process terminates. And only this function returns the new process handle which can be used to wait for its termination.
Thanks in advance.
Regards.
-
August 10th, 2009, 11:29 AM
#2
Re: How to execute 16 bit process via CreateProcess
What OS are you using? If it is Vista or later, you can say goodbye to 16 bit applications. They removed the 16 bit sub-system.
-
August 10th, 2009, 02:30 PM
#3
Re: How to execute 16 bit process via CreateProcess
-
August 10th, 2009, 06:05 PM
#4
Re: How to execute 16 bit process via CreateProcess
Does the following run from the command line?
Code:
C:\>C:\ZTOOLS\ZIMAGLIT.EXE Untitled.pcx Untitled.grf Untitled.GRF
If not, what are the errors?
-
August 10th, 2009, 08:44 PM
#5
Re: How to execute 16 bit process via CreateProcess
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
|