I found a part of the solution for delphi 4. declarations and DLL should be like follow:
function SMCConnect(port:Pchar;motor:longint):bool; stdcall;external ‘mtrapi32.dll’;
{tested: OK}
function SMCConnected:bool; stdcall;external ‘mtrapi32.dll’;
{tested: OK}
procedure SMCDisconnect; stdcall;external ‘mtrapi32.dll’;
{tested: OK}
function SMCDemo:bool; stdcall;external ‘mtrapi32.dll’;
{not tested}
function SMCGetDirection(motor:longint):longint; stdcall;external ‘mtrapi32.dll’;
{not tested}
function SMCGetInput(index:longint):bool; stdcall;external ‘mtrapi32.dll’;
{tested, not OK} {index de 0 à 5}
function SMCGetInputCount:longint; stdcall;external ‘mtrapi32.dll’;
{tested:OK}
function SMCGetMotorCount:longint; stdcall;external ‘mtrapi32.dll’;
{tested:OK}
function SMCGetMoving(motor:longint):bool; stdcall;external ‘mtrapi32.dll’;
{not tested}
function SMCGetOutput:bool; stdcall;external ‘mtrapi32.dll’;
{not tested}
function SMCGetOutputCount:longint; stdcall;external ‘mtrapi32.dll’;
{not tested}
function SMCGetTorque(motor:longint):bool; stdcall;external ‘mtrapi32.dll’;
{not tested}
procedure SMCMove(motor,steps,direction,speed:longint);stdcall;external ‘mtrapi32.dll’;
{tested:OK}
procedure SMCSetDemo(enable:boolean);stdcall;external ‘mtrapi32.dll’;
{tested:OK}
procedure SMCSetOutput(enable:boolean);stdcall;external ‘mtrapi32.dll’;
{not tested}
procedure SMCSetTorque(motor:longint;enable:bool);stdcall;external ‘mtrapi32.dll’;
{tested:OK}
procedure SMCStop(motor:longint);stdcall;external ‘mtrapi32.dll’;
{not tested}
my new problem now is that the smcgetinput function does not word, whereas it works with the motordemo.exe. Is it possible to get a detailed description of the functions from mtrapi.dll?
some solution to my smsgetinput problem?
best regards