K8047d.dll and python

hello. i need to make a program which works with 4 channel signal recorder (k8047). i downloaded libraries (k8047d.dll, fasttime32.dll). in delphi and vb demo it works fine, but i can’t force to work this dll in python (i want to do program exactly in python).
it’ll be good if anyone know python and can help me.
i use module “ctypes”:

[code]>>>from ctypes import *

libc=cdll.k8047d
libc.StartDevice()
2
libc.LEDon()
0[/code]
i think that LED on recorder must will be turn. but happens nothing. what i did wrong?

i found solution in PCS10 / K8047.dll and Visual Studio 2008 - VB.net.

i have one more problem:

[code]>>> from ctypes import *

lib=cdll.k8047d
lib.StartDevice()
33
lib.SetGain(3,5)
Traceback (most recent call last):
File “”, line 1, in
ValueError: Procedure called with not enough arguments (8 bytes missing) or wrong calling convention[/code]

what’s my mistake?

I made some googling and found these tips:
“The problem is the calling convention being used. cdll is for cdecl, windll is for windows’ stdcall.”
The solution seems to be: “Please try using ‘windll’ instead of ‘cdll’ to load the library…”