Causes and solutions for R6034 errors in COM components written by Python

Source: Internet
Author: User
The solution to this problem can be used to call the EXE file of the program to establish a suitable manifest file, specify the correct version of the Msvcr90.dll can be referenced, specifically http://www.jb51.net/article/35219.htm

PS: You can use Mt.exe to export or merge manifest resources into EXE or DLL files.

Ways to view manifest: Mt-inputresource:pythoncom27.dll; #2-out:sss.txt

to merge the manifest to DLL method:

Mt.exe–manifest myapp.exe.manifest-outputresource:myapp.exe;1

Or

Mt.exe–manifest mylibrary.dll.manifest-outputresource:mylibrary.dll;2

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

ps:2010.12.24

If you are developing DLLs using C + +, you can avoid this problem by replacing Msvcrtd.lib or msvcrtd.lib with LIBCMTD.lib or LIBCMT.lib.

PS: Inner Cow bowl noodles

Test regsvr32 Pythoncom27.dll has been a failure, even if the use of MT embedded manifest information is not, when I put the Windows\System32 directory Pythoncom27.dll and Pywintypes27.dll renamed, only then. The original regsvr32 default is to handle the DLL in the Windows\System32 directory, even if the current directory has no matter ... No words anymore. Finally appears "loaded ***.dll, but did not find DllRegisterServer input points ...". It seems that it works to embed manifest information in a DLL. The next best place to write the directory, such as: regsvr32. \pythoncom27.dll

ps:2010.12.26 Perfect Solution

I use the python2.7 as well as the current 2.6–3.1 version of Python's PYD file according to Python.org's recommendations (requirements), all without manifest information. This is done in order to better run the CRT provided by Python.exe when the program is running. The Pythoncom27.dll and Pywintypes27.dll provided by Pywin32 also have no manifest information. This is generally not a problem, except that a R6034 error occurs when using a COM component of a DLL type made by Python. There are 2 solutions: Make a manifest file for the EXE that calls the COM component, indicate the dependency of the Msvcr90.dll, or embed all the DLLs and PYD that are used in the manifest information.

Why is it that no one is studying this information at all? Perhaps the vast majority of pythoner do not play com bar ==| |
  • Related Article

    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.