[python-win32] Using COM DLL

Christiaan B v Zyl christiaanvanzyl at gmail.com
Wed Aug 13 18:47:39 CEST 2014


>
>
> Are you saying that the VB program works correctly without registering the
> DLL first?
>

You have to reference the DLL from the VB project.


> Now, regsvr32 does nothing except load the DLL and call DllRegisterServer.
>  So, you could, in fact, do this:
>     sdk = cdll.LoadLibrary(?PasSDK.dll?)
>     sdk.DllRegisterServer()
>
>
After doing this, when I then call Dispatch it fails with:
"Invalid class string"

And os.system("regsvr32...") probably won't work on later versions of
Windows if the script is not running with administrative privileges.

Guess I will have to be content with running regsvr32 as administrator as
part of the installation procedure for my script.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140813/f7c1a6ce/attachment.html>


More information about the python-win32 mailing list