Const $hDll = DllOpen("D:\CrackCaptchaAPI.dll")
Local $iResult = DllCall( _
$hDll, _
"int", "D2WndHandle", _
"str", "123", _ ; pszSoftwareId
"str", "A1", _ ; pszUserName
"str", "A2", _ ; pszUserPassword
"hwnd", HWnd(0x001003D4), _ ; hHandle
"str", "63 50 222 114", _ ; lpRect
"long", 60, _ ; usTimeout
"long", 44, _ ; ulVCodeTypeID
"str", "" _ ; pszVCodeText
)
If $iResult[0] > 0 Then
; OK, succeeds.
MsgBox(0, "ok", $iResult[8])
Else
MsgBox(48, "error", $iResult[0])
EndIf
如果提示错误的话,将str改为wstr试下。第4个参数hHandle应该设为一个窗口的句柄,这个句柄可以返回自WinGetHandle、WinWait等函数。另外,第5个参数lpRect用来指定窗口位置,这个参数竟是以空格分隔的字符串,太不合理了。 |