Hallo,
ich habe mit Autoit eine Parallelport Anwendung geschrieben, die unter 32 Bit Windows Versionen wunderbar funktioniert.
Dazu musste ich nur die inpout32.dll in das Programmverzeichnis kopieren und von dort aufrufen.
Nun bin ich auf Win 7 64 Bit umgestiegen und möchte die Anwendung entsprechend anpassen.
Es gibt eine inpoutx64.dll mit folgender Beschreibung:
http://logix4u.net/Legacy_Ports/P…_XP_64_bit.html
"Usage
There are examples and usage instructions for the 32bit version here . To use the pure 64bit version, all you need to do, is to link to my new InpOutx64.DLL using InpOutx64.lib. Everything else is the same."
Wie mache ich das denn unter Autoit? Was soll ich mit der .lib wie machen? Könnt ihr mir bitte weiterhelfen?
Bisher hieß mein Aufruf zum Lesen:
[autoit]Func Read_Port($ReadAddress)
;Read the port register (returns a BCD value)
$CurrentPortStatusArray = DllCall($dllpath, "int", "Inp32", "int", dec($ReadAddress))
$StatusToDecode = $CurrentPortStatusArray[0]
;convert to bit status & store in array
Dim $BitsReadArray[9]; [0] -> [7] the decoded bits, [8] the raw BCD value
$BitsReadArray[8] = $CurrentPortStatusArray[0]
$CurrentBitValue = 128
For $BitCounter = 7 To 0 Step - 1
If $StatusToDecode >= $CurrentBitValue Then
$BitsReadArray[$BitCounter] = 1
$StatusToDecode = $StatusToDecode - $CurrentBitValue
Else
$BitsReadArray[$BitCounter] = 0
EndIf
$CurrentBitValue = $CurrentBitValue / 2
Next
;test if good decode obtained
If $StatusToDecode <> 0 Then
MsgBox(0, "Decoding error", "Error in decoding port '" & $Port_Adresse & "' register '" & $ReadAddress & " status '" & $CurrentPortStatusArray[0] & "' to bits. Do not rely on the results.")
EndIf
Return $BitsReadArray
Exit
EndFunc ;==>ReadPortStatus
Vielen Dank!!!