1.11M Members

Calling C++ dll from Python

 
0
 

Hello,
Is it possible to use ctypes for this? I tried a sample code from net but it is not working.

from ctypes import cdll

myDll = ctypes.LoadLibrary('C++dll.dll')

mydll.testString()

Can u tell me how to load a C++ dll and call the functions from python?

 
0
 

Have you tried google?

 
0
 

Yes i googled and i found similar kind of code in a website.But when i run this it is not working?

 
0
 

Post that code for checkup ;)

 
0
 

Hello,
Is it possible to use ctypes for this? I tried a sample code from net but it is not working.

from ctypes import cdll

myDll = ctypes.LoadLibrary('C++dll.dll')

mydll.testString()

Can u tell me how to load a C++ dll and call the functions from python?

I can see typo on your code. myDll is not the same as mydll

 
0
 

There is good documentation at Python Site

 
0
 

Also ctypes is not imported

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article