Created
September 4, 2019 13:29
-
-
Save dapperfu/b00d91845ebd77f2a403842ab3d4c614 to your computer and use it in GitHub Desktop.
Passing a (const char *) in ctypes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dll = canape.dll | |
hdl = canape.handle | |
directory = ctypes.create_string_buffer(b"", 256) | |
size = ctypes.c_ulong() | |
# Asap3GetProjectDirectory | |
dll.Asap3GetProjectDirectory.argtypes=(TAsap3Hdl, ctypes.POINTER(type(directory)), ctypes.POINTER(ctypes.c_ulong)) | |
dll.Asap3GetProjectDirectory.restype=ctypes.c_bool | |
result = dll.Asap3GetProjectDirectory( | |
hdl, | |
ctypes.byref(directory), | |
ctypes.byref(size), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment