06-08-2017 03:04 PM - edited 06-08-2017 03:34 PM
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
06-08-2017 04:36 PM
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.