Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am migrating my VC++ 6.0 Application to Visual Studio 2005 for windows 7.Successfully i have migrated my application to Visual studio 2005 without any errors. But It throws an Exception Messagebox " Invalid Argument was encountered" while loading the application.Otherwise the application is working fine.The messagebox pops up everytime while opening the application.I have googled and tried out a lot of methods to identify the problem.But I can't.I got the below message in output window while debugging,

C++
First-chance exception at 0x7589d36f in Usecpol.exe: Microsoft C++ exception: CInvalidArgException at memory location 0x0012ed50..


Is there any way to suppress the message box???
Posted
Comments
Richard MacCutchan 29-Oct-12 5:39am    
You need to use your debugger to step through the code and find out where the assertion occurs.
EshwarTamil 29-Oct-12 6:49am    
Debugger points out the below line from "C:\Program Files\Microsoft Visual Studio 8\VC\crt\src\crtexe.c"

#ifdef WPRFLAG
mainret = wWinMain(
#else /* WPRFLAG */
mainret = WinMain(
#endif /* WPRFLAG */
(HINSTANCE)&__ImageBase,
NULL,
lpszCommandLine,
StartupInfo.dwFlags & STARTF_USESHOWWINDOW
? StartupInfo.wShowWindow
: SW_SHOWDEFAULT
);
#else /* _WINMAIN_ */
Richard MacCutchan 29-Oct-12 7:01am    
It should not give errors in the system library, try a full rebuild of your project.
EshwarTamil 29-Oct-12 7:33am    
Ya.. I have tried a full rebuild also.The same thing is happening..
Richard MacCutchan 29-Oct-12 7:48am    
I can only guess that something in your project settings or headers is referring to an old version which is not fully compatible with the libraries on your system. However, without looking at the actual project it's impossible to guess what it may be.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900