'Python Ctypes x64 OSError: exception: access violation reading 0x0000000000000008

I'm trying to comunicate with an infrared camera, using python interface and ctypes to call sdk functions in dlls. There is one function in C++(only .h files are given)

int sdk_start_url(IRNETHANDLE p, char* ip);

where IRNETHANDLE is defined as void* type. I try to call that function using

IrCamCtrldll.sdk_start_url.argtypes = (c_void_p, c_char_p)

ret = IrCamCtrldll.sdk_start_url(handle, c_char_p(b'192.168.1.123'))

Error appears as:

OSError: exception: access violation reading 0x0000000000000008

As I have used handle in other similiar functions, errors should NOT appeard with that. So there is something wrong with the second parameter.

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source