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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateProcess API not working in XP

Status
Not open for further replies.

BobBooker

Programmer
Dec 20, 2000
11
0
0

I have an ActiveX EXE that contains the line of code below.
This program has worked quite happily on all Windows platforms until I installed it on XP Pro.

If CreateProcess(sNullStr, sCmdLine, ByVal pNull, ByVal pNull, _
APITRUE, 0&, pNull, sInitDir, start, proc) Then
......

I setup a test environment on the XP machine to see what was going on.
It fails at this point with the last API error message:

Run-time error '2147192417 (8004729f)':
The Parameter is incorrect
(not sure which parameter it is referring to)

I thought a Kernel32 API call would have been the same in XP/2000. Any ideas?

Regards
Bob
 
Well, it looks like this software program has similar problems. There is a solution listed, don't know if it will help, b/c it's for their program:


Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Unfortunately this doesn't relate to my problem. Thanks for looking.

Does anybody know of a difference between API calls in 2000 and XP?

Cheers
Bob
 
Can you post the API definitions you are using (CreateProcess, APITRUE, StartupInfo and ProcessInfo also)

A little bit more code would be a help too. How have you defined pNull?

It also seems to me that there is a byval missing in the function call

try
Code:
 CreateProcess(sNullStr, sCmdLine, ByVal pNull, ByVal pNull, _
APITRUE, 0&, [COLOR=red]ByVal[/color] pNull, sInitDir, start, proc)

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top