Click here to Skip to main content
11,790,904 members (67,400 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VS2005 VC++

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,

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 28-Oct-12 20:11pm
Richard MacCutchan at 29-Oct-12 5:39am
You need to use your debugger to step through the code and find out where the assertion occurs.
EshwarTamil at 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 */
? StartupInfo.wShowWindow
#else /* _WINMAIN_ */
Richard MacCutchan at 29-Oct-12 7:01am
It should not give errors in the system library, try a full rebuild of your project.
EshwarTamil at 29-Oct-12 7:33am
Ya.. I have tried a full rebuild also.The same thing is happening..
Richard MacCutchan at 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)

  Print Answers RSS
0 OriginalGriff 410
1 ppolymorphe 385
2 Richard MacCutchan 118
3 Jochen Arndt 80
4 Maciej Los 70
0 OriginalGriff 1,329
1 Maciej Los 835
2 ppolymorphe 780
3 KrunalRohit 686
4 CPallini 661

Advertise | Privacy | Mobile
Web03 | 2.8.1509028.1 | Last Updated 29 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100