GuidData返回長度只有4,是我搞錯了嗎?
Global $aRet
$aRet = DllCall(@ScriptDir & "/NumOptTest.dll", "int", "StrOpt_GetGuidData", _
"int*", 0, _
"DWORD*", 0)
If @error Then Exit(-1)
ConsoleWrite("Return Code: " & $aRet[0] & @CRLF)
ConsoleWrite( _
Binary($aRet[1]) & @CRLF & _
$aRet[2] & @CRLF)
Global $aRet, $hGuidData
$hGuidData = DllStructCreate("BYTE GuidData[4];DWORD dwGuidDataSize")
$aRet = DllCall(@ScriptDir & "/NumOptTest.dll", "int", "StrOpt_GetGuidData", _
"PTR", DllStructGetPtr($hGuidData, "GuidData"), _
"PTR", DllStructGetPtr($hGuidData, "dwGuidDataSize"))
If @error Then Exit(-1)
ConsoleWrite("Return Code: " & $aRet[0] & @CRLF)
ConsoleWrite( _
DllStructGetData($hGuidData, "GuidData") & @CRLF & _
DllStructGetData($hGuidData, "dwGuidDataSize") & @CRLF)
|