Jump to content

HoangTieuBao

Members
  • Posts

    6
  • Joined

  • Last visited

HoangTieuBao's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Oh, tks for remind. And then, I check my code again. But it still fails ^^~ I think DllCallAddress function which still is not performance to use
  2. oh, right :v Because I write the code by manual when post.. Sr !!! But in the real code, I tested it. DllCallAddress set @error = 1, this is reason that I don't understand
  3. I'm sure about the first post. The dll name is exactly. This is link about function: http://msdn.microsoft.com/en-us/library/windows/desktop/ms740149%28v=vs.85%29.aspx And one more thing, I tested code, it works ok, no problem about ProcAddress and ModuleHandle
  4. I know @error is set to non zero if the call fails, but @error = 1 isn't had in the help This is in the help Don't have @error = 1 And GetModuleHandle and GetProcAddress are returning successful, (exactly value) But DllCallAddress still fails. I tried DllCall, it isn't what i need, it fails too
  5. First, I really want to know what API is DllCallAddress used? Second, I have this code #include <Winapi.au3> $SOCKETID = _GetSocketId() $hModule = _WinAPI_GetModuleHandle("Ws2_32.dll") $pProc = _WinAPI_GetProcAddress($hModule, "send") $pBuffer = DllStructCreate("byte[5]") DllStructSetData($pBuffer, 1, Binary("0x2EE96B457B")) $ret = DllCallAddress("int", $pProc, "dword", $SOCKETID, "ptr", DllStructGetPtr($pBuffer), "int", DllStructGetSize($pBuffer), "int", Null) Then, I get @error = 1 (not have in help document) and $ret = "" So, anybody help me about this problem, I'll thks that person
  6. I have this code: FileDelete("New.mdb") $Error = ObjEvent("AutoIt.Error", "ErrFunc") $ADODB = ObjCreate("ADOX.Catalog") $Struct = DllStructCreate("bool") DllStructSetData($Struct, 1, True) If Not FileExists("New.mdb") Then $ADODB.Create('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=New.mdb;User Id=admin;Password=;') $Table = ObjCreate("ADOX.Table") With $Table .Name = "Test" .Columns.Append('ID', 3) .ParentCatalog = $ADODB .Columns('ID').Properties('AutoIncrement') = DllStructGetData($Struct, 1) EndWith $ADODB.Tables.Append($Table) EndIf Func ErrFunc($oError) ; Do anything here. ConsoleWrite("err.number is: " & @TAB & Hex($oError.number) & @CRLF & _ "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ "err.description is: " & @TAB & $oError.description & @CRLF & _ "err.source is: " & @TAB & $oError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ "err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF) EndFunc When I run code, it show this content of the error I don't know how to fix it. So I hope u to help me for this problem. Thanks so much for read my thread ^^
×
×
  • Create New...