I'm programming an interface with 3M document scanners.
I am calling a function called MMMReader_GetData
MMMReaderErrorCode MMMReader_GetData(MMMReaderDataType aDataType,void* DataPtr,int* aDataLen);
Description:
After a data item has been read from a document it may be obtained via this API. The buffer supplied in the aDataPtr parameter will be written to with the data, and aDataLen updated to be the length of the data.
The problem is how can I create a void* DataPrt and how can get it the data?
I have tried:
from ctypes import *
lib=cdll.LoadLibrary('MMMReaderHighLevelAPI.dll')
CD_CODELINE = 0
aDataLen = c_int()
aDataPtr = c_void_p()
index= c_int(0)
r = lib.MMMReader_GetData(CD_CODELINE,byref(aDataPtr),byref(aDataLen),index)
aDataLen always returns a value but aDataPtr returns None