Solution and cause analysis of cfiledialog class crash for no reason

Source: Internet
Author: User

Apply in the simplest MFC dialog boxProgramUse the cfiledialog object to open the file dialog box. The interface is normally opened for the first time. After the dialog box is called up for the second time, as long as you shake the mouse on the file, it will crash and the debugger is disconnected from the shell32.dll module. Unhandled exception in test.exe (shell32.dll): 0xc0000005 access voilation. But changing to a virtual machine or another machine will be fine. After further debugging, it is found that a component of Adobe Acrobat uses shell extension programming. This cause was found for half a day, so we recorded it here to avoid forgetting it later. The solution is simple. Just call afxoleinit (); In the initinstance function of the application cwinapp.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.