title: Ctypes SError: [WinError 193] %1 is not a valid Win32 application
body: <p>I have this C code</p>
  <pre><code>int add(int a,int b){
      return a+b;
  }
  </code></pre>
  <p>and I am trying to use it in python</p>
  <pre><code>import ctypes
     
  library = ctypes.CDLL(r'C:\Users\sanad\Downloads\c,c++\test.dll')
  add = library.add()
  add.argtypes = [ctypes.c_int,ctypes.c_int]
  </code></pre>
  <p>I turned the C code into .dll file
  but python gives me this error</p>
  <pre><code>self._handle = _dlopen(self._name, mode)
  OSError: [WinError 193] %1 is not a valid Win32 application
  </code></pre>