One cause of accessviolationexception caused by commondialog

Source: Internet
Author: User

The problem is very simple, but it is not that easy to find the problem. This is only the cause of my problem. A lot of foreign discussions were referenced during this period. Many foreign users encounter this problem due to the following reasons:

1. Use of unmanaged code or modules;

2. the file to be accessed does not exist;

3. No permissions (mainly for Versions later than Windows Vista );

4. Compile optimization errors and disable related optimization options;

5. Too many controls (mainly Error creating window handle );

 

I changed the attributes in manifest a few days ago and added the following:

<Dependency>
<Dependentassembly>
<Assemblyidentity type = "Win32" name = "Microsoft. Windows. Common-Controls" version = "6.0.0.0" processorarchitecture = "*" publickeytoken = "6595b64144ccf1df" Language = "*"/>
</Dependentassembly>
</Dependency>

This Code allows the general controls to change the style from the system (of course, this is actually a permission issue ). Remove the code.

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.