我在下面的贴子中介绍过一个在powershell中执行AHK代码的方法
http://www.bathome.net/thread-68249-1-1.html
但现在我想在powershell使用下面AHK函数CryptHexStringToBinary,
例如想把 48B80000000000000000FFD0C3 这段16进制字符串转为二进制数据, 不知道怎么用了, 请求路过大佬帮忙, 谢谢
在AHK中使用CryptHexStringToBinary函数的方法如下- 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", &hookBuf)
复制代码
|