Im looking to write a plugin for eventghost.
But i'm a bit of a noob...
I need to pass the address of a variable, that is a GUID, to a dll function.
as in 'c++'
GUID MyGuid;
SomeDllFuntion(&MyGuid);
this is what I have so far....
Code: Select all
from eg.WinAPI.GUID import GUID
def __start__(self):
Mydll = WinDLL('somedll')
MyGuid = GUID
Mydll.SomeDllFunction(byref(MyGuid))
print (MyGuid)
Code: Select all
3:30:22 PM File "C:\Program Files\EventGhost\eg\TreeItems\PluginItem.py", line 107, in StartPlugin
3:30:22 PM File "plugins/NewPlugin/__init__.py", line 35, in __start__
3:30:22 PM TypeError: byref() argument must be a ctypes instance, not '_ctypes.StructType'
Code: Select all
3:33:22 PM ArgumentError: argument 1: <type 'exceptions.TypeError'>: Don't know how to convert parameter 1