LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CreateProcess Application Error (0xc0000005)

I'm trying to run an exe through windows api using CreateProcess() command. 

 

So I have a function that specifically creates this exe process and then evaluates the outcome of the exe.

 

My issue is this:

- if I were to have this function in a separate project and execute it as a main or DLL (through TestStand), I do not have any issues whatsoever.

- If I take this independent project as (DLL and/or LIB), I would get an error as the attached image.

 

At first I thought I was missing <stdio.h> but that did not resolve my issue. 

 

I'm executing the following:

 

test = CreateProcess( NULL,
cmd_command,
NULL,
NULL,
FALSE,
CREATE_DEFAULT_ERROR_MODE | DETACHED_PROCESS,
NULL,
NULL,
&Startup_Info,
&Process_Info);

 

Edit: added another photo that may be of clue to some, but I got a fatal run-time error. Also, I found this, but I don't think it applies to me as I'm not using user.dll

Download All
0 Kudos
Message 1 of 2
(2,928 Views)

Well ... considering that I cannot seem to make it work when calling from other DLL/LIB, I tried copying the code into the main and it seems to work.

 

I'm not sure calling another library would cause this error; however, I suppose it's a fix for now.

0 Kudos
Message 2 of 2
(2,904 Views)