Causes and solutions for R6034 errors of com components written in Python

Source: Internet
Author: User

To solve this problem, you can create a proper manifest file for calling the exe file of the program, specify the correct msvcr90.dll version, the specific can refer to the http://www.jb51.net/article/35219.htm

Ps: You can use mt.exe to export or merge manifest resources to exe or dll files.

Manifest method: mt-inputresource: pythoncom27.dll; #2-out: sss.txt

Merge manifest to dll:

Mt.exe-manifest MyApp.exe. manifest-outputresource: MyApp.exe; 1

Or

Mt.exe-manifest MyLibrary. dll. manifest-outputresource: MyLibrary. dll; 2

(1 for an EXE, 2 for a DLL .)

Ps: 2010.12.24

If you use c ++ to develop dll, you can also avoid this problem by replacing msvcrtd. lib or msvcrtd. lib with libcmtd. lib or libcmt. lib.

Ps: inner bowl of noodles

The test of regsvr32 pythoncom27.dll has always failed, even if the manifest information is embedded with mt, it will not work. After I change the names of pythoncom27.dll and pywintypes27.dll under the windows \ system32 directory. The original regsvr32 is by default processing the dll in the windows \ system32 directory, even if the current directory does not exist ...... Speechless. "Loaded ***. dll is finally displayed, but the dllregisterserver Input Point is not found .....". It seems that it is useful to embed manifest information in the dll .. Next time you 'd better write the directory, such as regsvr32. \ pythoncom27.dll.

Ps: 2010.12.26 perfect solution

The python2.7 I used and the pyd file of python 2.6-3.1 so far have no manifest information according to the suggestions (requirements) of python.org. This is to better run the crt provided by python.exe at the program runtime. Pythoncom27.dll and pywintypes27.dll provided by pywin32 do not have manifest information. In this case, there is no problem in general, but the R6034 error occurs when the dll-type com component is created using python. There are two solutions: Create a manifest file for the exe that calls the com component, specify the dependency of msvcr90.dll, or embed all the used dll and pyd into the manifest information.

Why is there no one studying this information? Maybe the majority of pythoner do not play com ==||

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.