title: Python calling an SDK function in DLL of a sensor that takes pointer IP and port and return a void* (void* a handle to the profile sensor.)
body: <p>I am just new in Python. I am trying to connect to a laser sensor through its DLL library. The SDK functions in this Library are compiled in C++ language. </p>
  
  <p>By using ctypes in python my first try is to call the EthernetScanner_Connect function. The function parameters are as follow:</p>
  
  <pre><code>void* EthernetScanner_Connect(char *chIP, char *chPort, int iTimeOut)
  </code></pre>
  
  <p>According to the function discription in c++ it should return NULL pointer if a failure in connection occurs, otherwise it should return the handle to the profile sensor, which is gonna be used in other functions.</p>
  
  <p>My code on python untill now:</p>
  
  <pre><code>from ctypes import *
  
  lib=windll.LoadLibrary("c:\\EthernetScanner.dll")
  
  if lib:
      print("the Library is loaded")
  
  EthernetScanner_Connect = getattr(lib,"EthernetScanner_Connect")
  
  EthernetScanner_Connect.restype = c_void_p
  EthernetScanner_Connect.argtypes =[c_char_p,c_char_p,c_int]
  x = EthernetScanner_Connect(b"193.164.200.1\0",b"32407\0",0)
  
  print(x)
  </code></pre>
  
  <p>while I am expecting NULL from this function because i am not connected to the sensor yet, it is giving me the following:</p>
  
  <pre><code>the Library is loaded
  45940800
  </code></pre>