Link to home
Start Free TrialLog in
Avatar of jazzIIIlove
jazzIIIloveFlag for Sweden

asked on

C++ ProcessShellCommand(params) issue with exception as "Unhandled exception at 0x7771b9bc (KernelBase.dll)". How to fix?

Hi there;

After converting my project from VS2008 to VS2010, my C++ program crashes in the very line;
ProcessShellCommand(params), simply crashes and when ignore during debugging, I end up with CInvalidArgException Class exception with the following message.

Unhandled exception at 0x7771b9bc (KernelBase.dll) in MyProgram.exe: Microsoft C++ exception: CInvalidArgException at memory location 0x0018f564..

What should I do? How can I fix this problem?

Kind regards.

P.S.
Addition;
The stack trace for this is as:

First-chance exception at 0x7771b9bc (KernelBase.dll) in MyProgram.exe: Microsoft C++ exception: CInvalidArgException at memory location 0x0018f564..
Unhandled exception at 0x7771b9bc (KernelBase.dll) in MyProgram.exe: Microsoft C++ exception: CInvalidArgException at memory location 0x0018f564..
The thread 'Win32 Thread' (0xfb4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x26a0) has exited with code 0 (0x0).
Detected memory leaks!
Avatar of jkr
jkr
Flag of Germany image

Well, what are the arguments that are being processed?
Avatar of jazzIIIlove

ASKER

Hi jkr, thanks for the interest:

Just, command line arguments as the program needs a command line argument indicating the path of the file that program uses during startup.

Kind regards.
Hm, that I assumed somehow ;o)

And in detail?
What other details do you need? The window is created after the parameter passing to ProcessShellCommand. Is this the case?

Kind regards.
Um, what would be nice is

- the actual parameters
- the snippet of code in question

Sorry, but my chrystal ball is on repair ;o)
lol, u are absolutely right. I will check what i can for the code. The params is just a path to a configuration file for that C++ application.

Note that before conversion, it was OK.

I suspect as i draw the GUI for the program after passing param to that function. Could it be a reason for the crash?

Regards.
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial