Jump to content

Search the Community

Showing results for tags 'deviceiocontrol'.

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

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 2 results

  1. This function is used to create a unique system I/O control code (IOCTL). ; Ported from C to C#: http://www.emoticode.net/c-sharp/win32-ctl_code-macro-ported-to-c.html Func _WinAPI_Create_CTL_CODE($iDeviceType, $iFunction, $iMethod, $iAccess) Return BitOR(BitShift($iDeviceType, -16), BitShift($iAccess, -14), BitShift($iFunction, -2), $iMethod) EndFunc ;==>_WinAPI_Create_CTL_CODE
  2. How do I convert this to autoit? I've seen people here post examples (Manko) of communicating with device drivers, but this is ridiculously complex! #define CODEMSG(_digitval) CTL_CODE(FILE_DEVICE_UNKNOWN,_digitval , METHOD_BUFFERED,\ FILE_READ_DATA | FILE_WRITE_DATA) #define CODE_VALUE 4094 //handle to driver HANDLE device = 0; char ret[1024]; WCHAR SendValue[512]; DWORD codeval, bytes; if( !strcmp(argv[i],"-p") ) { codeval = CODE_VALUE; i++; continue; } MultiByteToWideChar(CP_ACP, 0, argv[i], -1, SendValue, sizeof(SendValue)); DeviceIoControl(device, CODEMSG(codeval), SendValue, (wcslen(SendValue)+1)*2, &ret, sizeof(ret),&bytes,NULL); The farthest I've got is~ #Include <WinAPI.au3> $Handle = _LoadDriver() $Struc = DllStructCreate("char[1024];WCHAR[512];DWORD") DllStructSetData($Struc, 3, _WinAPI_MultiByteToWideChar("I have no idea what I'm doing" , 0, $MB_PRECOMPOSED , true)) MsgBox(0,"",DllStructGetPtr($Struc)) $ret = DllCall("kernel32.dll", "int", "DeviceIoControl", _ "dword", $Handle, _ "dword", DllStructGetPtr($Struc,3), _ "ptr", DllStructGetPtr($Struc), _ "dword", 12, _ "ptr", DllStructGetPtr($Struc), _ "dword", 12, _ "dword*", 0, _ "ptr", 0) Until I slowly started to realize I have absolutely no idea what I'm doing.
×
×
  • Create New...