Can't open

When I run a program in C++ by manually double clicking it, it opens just fine.

But when I run the C++ program through VB.NET, it opens and stops responding for some reason.

Any help?
No idea. Attach the Visual Studio debugger to the frozen C++ process and examine the call stacks. Remember to enable the Microsoft Symbol servers to obtain meaningful function names in the stack.
The error I get is: bad memory allocation

I have checked what causes this and these are the reasons:
1) You've exhausted the heap.

2) There isn't a contiguous block of memory large enough that can be allocated.

3) Your code corrupted the heap manager at some point.

I have 8 gb ram, so that's not an issue. Any help?
Get support from the programmer of the C++ application. It would be impossible for us to assist since we have no idea about how the application was coded.
It's just a simple hello world program in C++...

As for the vb.net code, all it does is run the program.

Here is the code for that:

Process.Start("C:\helloworld.exe")

Any help?
Ok, so you have the source code. Great. Attach the Visual Studio debugger to the failed C++ process. This will let you see the stack trace, and with the source code you can even get the exact line where it happens. Let's start there. If you don't understand what the debugger is telling you, then at least start by posting the code here.

Remember to use code tags when you post code in this forum. See http://bit.ly/L4Jhl7 for details.
System.Diagnostics.Process.Start("C:\helloworld.exe")'Try this in your VB.NET app.

'Or you could just try coding a .vbs file and running it through that, or use the system command in C++, though it is not recommended.

'VBS Code:

Dim R

Set R = CreateObject("wscript.shell")

R.Run("C:\helloworld.exe")
Last edited on
Topic archived. No new replies allowed.