Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CPropertySheet

Posted on 2010-11-11
3
Medium Priority
?
1,209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 500 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 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

636 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