Jump to content

dllcall pointer problem


Recommended Posts

you dont need msgboxes, something like this is better

$dll = DllOpen("Susi.dll")
$ret1 = DllCall($dll,"BOOL:cdecl","SusiDllInit")
_error(@error,'SusiDllInit',$ret1)
$ret2 = DllCall($dll,"int", "SusiIOAvailable")
_error(@error,'SusiIOAvailable',$ret2)
$ret3 = DllCall($dll,"BOOL:cdecl", "SusiLEDSet", "int", 0x02)
_error(@error,'SusiLEDSet',$ret3)
$ret4 = DllCall($dll,"BOOL:cdecl", "SusiDllUnInit")
_error(@error,'SusiDllUnInit',$ret4)
DllClose($dll)
Exit
Func _error($err,$func,$return)
    If $err Then
        ConsoleWrite('!>'&$func&'>>> Error: '&$err&@CRLF)
        Switch $err
            Case 1
                ConsoleWrite('!^'&$func&'^^^^ Error: unable to use the DLL file'&@CRLF)
            Case 2
                ConsoleWrite('!^'&$func&'^^^^ Error: unknown "return type"'&@CRLF)
            Case 3
                ConsoleWrite('!^'&$func&'^^^^ Error: "function" not found in the DLL file'&@CRLF)
            Case 4
                ConsoleWrite('!^'&$func&'^^^^ Error: bad number of parameters'&@CRLF)
        EndSwitch
    Else
        ConsoleWrite('>'&$func&': '&$return[0]&@CRLF)
    EndIf
EndFunc

its strange that i did not finde SusiLEDSet func inside dll that i downloaded, and rest funcs are there.

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...