LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Int64 oder QWORD Wie kann ich in Lv 6.1 diese Variable an eine DLL weitergeben?

function GetPositionEX (ShowMS : boolean):DWORD;
var
SongPos: int64; // in Lv gibts nur int32
FloatPos: FLOAT;
begin
result := 0;
SongPos := BASS_ChannelGetPosition(Channel);
if SongPos < 0 then
SongPos := 0;
FloatPos := BASS_ChannelBytes2Seconds(Channel, SongPos);
If ShowMS then
Result := round(1000 * FloatPos) // milli sec
else
Result := round(FloatPos) // seconds
end;
0 Kudos
Message 1 of 3
(2,768 Views)
Man muß im Funktionsprototyp statt int64 double verwenden. In LV verwendet man einen Cluster bestehend aus zwei int32. Mit der Type cast funktion wird der Cluster in den Datentyp double umgewandelt. Die Daten bleiben dabei erhalten.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 3
(2,768 Views)
Ich habe das Beispiel nach LV 6.1 konvertiert und die Daten getauscht, so daß sie mit der PC üblichen Darstellung übereinstimmen (Low word zuerst).

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 3 of 3
(2,768 Views)