Python 64 Bit Dll Com Server Registration Problem On 64 Bit Windows 7
I am trying to create a simple COM server using Python 2.7 on 64 bit Windows 7, but I can't get the DLL registered successfully. I am able to do this successfully using Python 2.6
Solution 1:
This looks like a duplicate of Com server build using Python on 64-bit Windows 7 machine.
Add "import win32traceutil" to the top of heikki.py and run C:\Python27\Lib\site-packages\win32\lib\win32traceutil.py in a second Python process to see the traceback from heikki.dll:
Traceback (most recent calllast):
File "boot_com_servers.py", line 37, in<module>
pywintypes.error: (126, 'GetModuleFileName', 'The specified module could not be found.')
Traceback (most recent calllast):
File "<string>", line 1, in<module>
NameError: name 'DllRegisterServer'isnot defined
Update:
There's a bug in py2exe on 64 bit Python. The sys.frozendllhandle, initialized by py2exe, is invalid such that win32api.GetModuleFileName(sys.frozendllhandle) fails.
You might want to try the patched py2exe installers at http://www.lfd.uci.edu/~gohlke/pythonlibs/#py2exe
Post a Comment for "Python 64 Bit Dll Com Server Registration Problem On 64 Bit Windows 7"