Help..on Python

A forum for general discussion of the Python programming language.

Help..on Python

Postby alabview » Mon Oct 07, 2013 1:36 pm

Hi there,

I wish to pass a single value for example 24 then output value should be 48 via DLL.

Code: Select all
from ctypes import CDLL, c_double, c_int32

X = (c_double)
Y = (c_double)
InputFarenheit = X(23)
OutputCelsius = Y(0)
CallDLL = CDLL ("C:\\Walter\\Pyhton_Examples\\builds\\TestDLL\\My DLL\\SharedLib.dll")
CallDLL.SharedLib(InputFarenheit,c_int32,OutputCelsius,c_int32)



There is an error,
Code: Select all
Traceback (most recent call last):
  File "C:\Walter\Pyhton_Examples\Math_Script.py", line 8, in <module>
    CallDLL.SharedLib(InputFarenheit,c_int32,OutputCelsius,c_int32)
  File "C:\Python33\lib\ctypes\__init__.py", line 366, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python33\lib\ctypes\__init__.py", line 371, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'SharedLib' not found


Please advice...
Last edited by stranac on Mon Oct 07, 2013 2:26 pm, edited 1 time in total.
Reason: Corrected code tags
alabview
 
Posts: 22
Joined: Mon Sep 16, 2013 1:48 pm

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests