Hi Hope you could answer the following question to me or lead me to the right direction.I have coded
a project which uses Marshal::AllocHGlobal as you know it allocates memory from the unmanged memory for char * and int.I
also used Marshal.FreeHGlobal to free the memory. The program works fine the first time…….
And sometimes 2 3 4 5 times but eventually I get the above message.char
*chrVersionName = (char*)(Marshal::AllocHGlobal(17).ToPointer()); this is the code where sometimes the program dies…..and
this how I free the memory.Marshal::FreeHGlobal(IntPtr(chrVersionName));Any
suggestions what I’m doing run?I am using Visual Studio .NET Frawork 2.0Microsoft
Visual Studio 2005Version 8.0.50727.762(SP.050727-7600)Microsoft .NET FrameworkVersion 2.0.50727Microsoft
Visual C++ 200577626-009-0000007-41932I hope you could help me…..
mjocasio
Member
58 Points
70 Posts
System.StackOverflowException was unhandled
Jul 13, 2007 03:56 PM|LINK
Bugs