Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crypt HexString To Binary
#1
Using Windows API in QM is convenient. I would like to convert the following AutoHotKey (AHK) code into QM code.

However, the function names include a path(crypt32\CryptStringToBinaryW), and I am unsure how to handle it.

Additionally, Is there simpler QM built-in function that can achieve the same functionality as the AHK code?

Thanks any suggestions and help in advance.
David
 
Code:
Copy      Help
CryptHexStringToBinary(hexString, &binary){
    DllCall("crypt32\CryptStringToBinaryW", "str", hexString, "uint", len := StrLen(hexString), "uint", 4, "ptr", 0, "uint*", &bytes := 0, "ptr", 0, "ptr", 0)
    return DllCall("crypt32\CryptStringToBinaryW", "str", hexString, "uint", len, "uint", 4, "ptr", binary := binary ?? Buffer(bytes), "uint*", bytes, "ptr", 0, "ptr", 0)
}
CryptHexStringToBinary("48B80000000000000000FFD0C3", &resBinary)


Messages In This Thread
Crypt HexString To Binary - by Davider - 02-06-2024, 11:28 PM
RE: Crypt HexString To Binary - by Kevin - 02-08-2024, 02:25 AM
RE: Crypt HexString To Binary - by Davider - 02-09-2024, 11:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)