Jump to content

Search the Community

Showing results for tags 'DLLCall RDingUSB'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. The delphi code looks like this : private IntPtr _device = new IntPtr(-1); private readonly byte[] _readVersionCommand = new byte[] { 0, 1, 134, 255, 1, 0, 0, 0, 0 }; byte[] bVersion = new byte[9]; _device = RDing.OpenUSBDevice(UsbVendorId, UsbDeviceId); RDing.WriteUSB(_device, _readVersionCommand, (uint)_deviceOutputLength, ref numberOfBytesWritten); RDing.ReadUSB(_device, bVersion, (uint)_deviceInputLength, ref _numberOfBytesRead); I translated it to : $b = DllStructCreate("byte[9]") $c = DllStructCreate("word") $cTemp = DllStructGetPtr($c) $e= DllStructCreate("byte[9]") Dim $TemperReadVersionCommand[11] = [0,1,134,255,1,0,0,0,0,0,0] For $I = 0 To 8 DllStructSetData($b,1,$TemperReadVersionCommand[$I],$I+1) Next Global $ghHidFTDll = DLLOpen("RDingUSB.dll") $TemperDevice = DllCall($ghHidFTDll,"bool","OpenUSBDevice","int",3141,"int", 29697)$TemperRequestTemperature = DllCall($ghHidFTDll,"int","WriteUSB","int",$TemperDevice[0],"str",DllStructGetData($b,1),"uint",9,"ptr",$cTemp) $temperReadTemperature = DllCall($ghHidFTDll,"int","ReadUSB","int",$TemperDevice[0],"str*",$e,"uint",9,"ptr",$cTemp) The first and second DLLCall gives a good result (return code 0). The second DLL call return an error on the second parameter. (return code 1) The result should be a 9 byte array in the second parameter ($e). What do I wrong. How can I pass a variable to write the array to ? Tanks in advance for your help.
×
×
  • Create New...