title: declare variable in python ctypes and passing to dll function
body: <p>for example I have a C++ variable declaration and function like this(assume its a dll function)</p>
  
  <pre>
  
      int img_width, img_height, stride;
      somefunction(&img_width, &img_height, &stride)
      {
      ....
      }
  
  </pre>
  
  <p>same thing how can we do using python ctypes?</p>
  
  <p>I tried in the following way</p>
  
  <pre>
  img_width, img_height, stride = c.POINTER(c_int), c.POINTER(c_int), c.POINTER(c_int)
  dll.somefunction(img_width, img_height, stride)
  </pre>
  
  <p>which resulted the following exception</p>
  
  <pre>
  ctypes.ArgumentError: argument 1: : Don't know how to convert parameter 1)
  </pre>
  
  <p>I also tried in following way</p>
  
  <pre>
  dll.somefunction.restype = c.c_void_p
  dll.somefunction.argtypes = [c.POINTER(c_int), c.POINTER(c_int), c.POINTER(c_int)]
  dll.somefunction(img_width, img_height, stride)
  </pre>
  
  <p>Where I endup with following exception</p>
  
  <pre>
  NameError: global name 'img_width' is not defined
  </pre>