Solved

CPropertySheet

Posted on 2010-11-11
3
1,173 Views
Last Modified: 2012-05-10
Hi I have a problem when creating a CPropertySheet and CPropertyPage.When I run my program both debug or release mode I get an error First-chance exception at 0x773d7901 in PYDVR.exe: 0xC0000005: Access violation writing location 0x004739ec the error is generated after i call DoModal() and is generated in the file dlgprob.cpp line 931 HWND hWnd = (HWND)::AfxPropertySheet(&m_psh); The strange thing is it dosnt cause the application to fail and the property pages work fine even if i run the release version there is no crash. I tried the three ms samples CmnCtrl1 and Cmnctrl2 both do not cause the same error but running Cmnctrl3 example the same error happens I am using vs2010. Has anyone come accross this error? I don't think its my code as I have basically copyied the ms sample.
0
Comment
Question by:nchannon
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 125 total points
ID: 34115354
Hi nchannon,

first-chance exception may occur in some cases without being caused by a bug - here's a short article about what first-chance exceptions are: http://support.microsoft.com/kb/105675/en-us

In short words a first-chance exception is shown by the debugger as soon as the exception occurs but before the program probably handled it. The second-chance exception is thrown if such a first-chance exception isn't handled by the application.

Of course it would be good to know the reason because it could be an indication for an error in your code - check the debug output if there's someting strange. Maybe going through the code with the debugger may even give you a hint what's the cause.

Hope that helps,

ZOPPO
0
 
LVL 5

Assisted Solution

by:greatsubash
greatsubash earned 125 total points
ID: 34118206
0
 

Author Comment

by:nchannon
ID: 34121004
Thanks Zoppo at least I can ignore the first-chance exception as it only happens the once still I think it must be a bug between XP and WIN7 as it is fine when you debug under WIN7 only throws the exception under XP.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Example of WebAPI 7 32
White board coding practice 3 80
trigs fail! I thought I knew how to do trignometry 3 56
show out valin of json for debugging in visaul c++ 1 16
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now