Nutzung der inpoutx64.dll

  • 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

    [/autoit][autoit][/autoit][autoit]

    Return $BitsReadArray
    Exit
    EndFunc ;==>ReadPortStatus

    [/autoit]

    Vielen Dank!!!

  • Hi, versuche mal, alle Typen im Dll-Call auf 64 Bit zu setzen, also aus INT machst du INT64.
    Um die Lib´s brauchst du dir idr keine Gedanken zu machen, die werden zu der DLL dazugelinkt, die brauchst du nur, während die Dll compiliert wird.
    Ggf. wird auch noch der Treiber hwinterfacex64.sys gebraucht....

  • Danke für die schnelle Antwort - aber das ist 2 Schritte zu hoch für mich. Leider.

    1. Die Lib brauchst Du nur, währd die DLL kompiliert wird -> das mache ich nicht, weil ich die DLL ja schon habe, richtig?

    2. Wo soll ich denn den Treiber hwinterfacex64.sys hinkopieren, damit die automatisch verwendet wird?

    Gruß

  • zu1) Richtig!
    zu2)

    Zitat

    Driver will be automatically installed and configured automatically when the dll is loaded

    also ins Verzeichnis der Dll