Click here to Skip to main content
11,496,146 members (809 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: VS2005 VC++
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,

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 21:11pm
Comments
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 */
(HINSTANCE)&__ImageBase,
NULL,
lpszCommandLine,
StartupInfo.dwFlags & STARTF_USESHOWWINDOW
? StartupInfo.wShowWindow
: SW_SHOWDEFAULT
);
#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 Dnyaneshwar@Pune 692
1 RyanDev 230
2 CHill60 163
3 Sascha Lefèvre 145
4 Sergey Alexandrovich Kryukov 124
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web01 | 2.8.150520.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