I have a DLL, it is an SDK for the Pastel Partner accounting system. Using
Dependency Walker I can see that the DLL has the following methods:
DllRegisterServer, DllUnregisterServer, DllGetClassObject

With the library there came a sample VB program that referenced the DLL and
instantiated it like this:
Dim SDK As New PasSDK.PastelPartnerSDK

The only way I've been able to use this library from python is to register
it with Windows:
regsvr32 PasSDK.dll

And then use it in python like this:
import win32com.client
sdk = win32com.client.Dispatch(PasSDK.PastelPartnerSDK")
sdk.SetLicense(...)
etc...

However, is there a way to use this library directly without registering it
first? Something like:
from ctypes import *
sdk = cdll.LoadLibrary('PasSDK.dll')

When I do this I can see that sdk.DllGetClassObject is a function, but how
do I instantiate it like the VB program, is it possible?
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to