Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateProcess() Windows NT

Status
Not open for further replies.

AAP

Programmer
May 8, 2000
93
GB
I am trying to start a 16 bit windows program on a NT terminal, via the CreateProcess() function. It works ok, but the resulting PROCESS_INFORMATION structure only has the hProcess member populated. hThread, dwProcessld and dwThreadId all return zero. This does not happen with Windows 98. Any ideas anyone? [sig][/sig]
 
Here an example which I used with Windows NT

==========================================================
// create Command
STARTUPINFO sti;
_PROCESS_INFORMATION pi;

pgpcmd(cmd,PGPSIGNEXT,"","");

// Setup Flags
flags=NORMAL_PRIORITY_CLASS;
flags |=CREATE_NEW_PROCESS_GROUP;
flags |=CREATE_NEW_CONSOLE;

// Get Process information
GetStartupInfo(&sti);
// Start with Window closed
sti.wShowWindow =SW_SHOWMINIMIZED;

// Start Task
if(!( CreateProcess(NULL,cmd,NULL,NULL,false,flags,NULL,"./",&sti,&pi)))
erc=GetLastError();
============================================================

Good Luck
[sig]<p>hnd<br><a href=mailto:hasso55@yahoo.com>hasso55@yahoo.com</a><br><a href= > </a><br> [/sig]
 
Perhaps the reason for your problem is: Windows NT Creates an own Partition for each DOS Application. [sig]<p>hnd<br><a href=mailto:hasso55@yahoo.com>hasso55@yahoo.com</a><br><a href= > </a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top