Re: CreateProcess Fails With No Error
- From: Sinna <news4sinna_NOSPAM@xxxxxxxxxx>
- Date: Wed, 15 Jun 2005 14:44:13 +0200
Steve Cooper wrote:
Why is it that the following call:-
lngRet = CreateProcess(0&, "TestProg.EXE", 0&, 0&, 1&, NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
Always works from within one VB6 program but in another always returns zero and proc.hProcess = 0 yet a call to GetLastError returns zero.
In both programs start is set up as follows:-
start.cb = Len(start) start.wShowWindow = SHOWNORMAL
the CreateProcess and GetLastError headers, PROCESS_INFORMATION and STARTUPINFO structures and the NORMAL_PRIORITY_CLASS, SHOWNORMAL constants are declared in EXACTLY the same way (one is copied and pasted from the other). TestProg.EXE is present in both project folders and is exactly the same in each.
THANKS
Are you using the API call GetLastError? If so, replace it by Err.LastDllError and see what value you get there. GetLastError API is not usable in VB since the RunTime calls it itself.
Sinna .
- Follow-Ups:
- Re: CreateProcess Fails With No Error
- From: Steve Cooper
- Re: CreateProcess Fails With No Error
- References:
- CreateProcess Fails With No Error
- From: Steve Cooper
- CreateProcess Fails With No Error
- Prev by Date: CreateProcess Fails With No Error
- Next by Date: Re: CreateProcess Fails With No Error
- Previous by thread: CreateProcess Fails With No Error
- Next by thread: Re: CreateProcess Fails With No Error
- Index(es):
Relevant Pages
|