Hy@ALL
Hab da n Problemchen.
Versuche ein Delphi Programm in Auto It umzusetzen.
und hab bei ein paar zeilchen gewisse probleme..
wenn mir jemand helfen könnte ?! Wäre echt SUPER !!
---------------------------------------------------------------------
hier ein Auszug aus der DLL Description ::
Syntax
PROCEDURE ReadData(Buffer: Pointer);
Parameter
Buffer: A pointer to the data array of 8 integers where the data will be read.
Description
Reads the timer counter status and the A/D data from the K8047 to a buffer in the application program.
The timer counter is incremented every 10ms. The new data from the A/D converter channels 1...4 is updated every time the timer counter is incremented.
Data structure:
Timer data A/D converter data Reserved
LSB MSB CH1 CH2 CH3 CH4 0 0
Example
var // global variables
DataBuffer: ARRAY[0..7] OF Integer;
procedure TForm1.Button1Click(Sender: TObject);
var p:pointer;
i:integer;
s:string;
begin
p:=@DataBuffer; // Address of the data buffer
ReadData(p); // Read the data from K8047
memo1.clear;
s:='';
for i:=0 to 7 do s:=s +inttostr(DataBuffer[i]+chr(9);
memo1.lines.add(s); // Display the data
end;
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
meine bisherige lösung ::
Dim $DataBuffer[8]
$result = DllCall("C:\WINDOWS\system32\K8047D.dll","char","StartDevice")
$result = DllCall("C:\WINDOWS\system32\K8047D.dll","char","LEDon")
While 1
sleep(200)
$point = InputBox("start","bitte pointer eingeben","0")
$DataBuffer[0] = DllCall("C:\WINDOWS\system32\K8047D.dll","char","ReadData","char",$point);,"int","0")
;DllCall(" dll","return type","function"[,"type1",param1[,"type n",param n]] )
MsgBox(4096,"",$point & " / " & $DataBuffer[0] & " / " & $DataBuffer[1] & " / " & $DataBuffer[2] & " / " & $DataBuffer[3] & " / " & $DataBuffer[4] & " / " & $DataBuffer[5] & " / " & $DataBuffer[6] & " / " & $DataBuffer[7])
WEnd
-----------------------------------------------------------------------
tut sich aber nix ... WARUM ?!
jemand ne idee ??
DANKE !