Sign in to follow this  
Followers 0
devilyn

Help with DLLCALL

5 posts in this topic

#1 ·  Posted (edited)

I'm trying to translate this DLL call to autoit

UUIRTDRV_API BOOL PASCAL UUIRTGetDrvInfo(unsigned int *puDrvVersion);

Retrieves information about the *driver* (not the hardware itself). This is intended to allow version control on the .DLL driver and accomodate future changes and enhancements to the API. Returns TRUE on success, as well as a driver version number in *puDrvVersion. NOTE: This call may be called prior to a call to UUIRTOpen.

And that what i wrote in au3

Func USBUIRT_DriverInfo()
ConsoleWrite('@@ (63) :(' & @MIN & ':' & @SEC & ') USBUIRT_DriverInfo()' & @CR) ;### Function Trace
Local $vers
;VarSetCapacity(vers, 12)[/size][/font][/color]
[color=#0212BF][font=Arial, Helvetica, sans-serif][size=1]$callR = DllCall($hdll, "UINT_PTR", "UUIRTGetDrvInfo" ,"UINT*",$vers) ; Current driver version[/size][/font][/color]
[color=#0212BF][font=Arial, Helvetica, sans-serif][size=1]If @error Then
MsgBox(16, "Error", @error & " " & $vers & " " & $callR)
;drvvers : = NumGet(vers, 0)
Else
_ArrayDisplay($callR)
_ArrayDisplay($vers)
ConsoleWrite($vers&" "&$callR&@CRLF)
EndIf
Return $vers
EndFunc ;==>USBUIRT_DriverInfo

It currently returns:

[0] = 1

[1] = 256

And that's not version of the DLL

Thanks in advance

Edited by devilyn

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

as far as i understand from google search (im not saying that im correct) 256 shud be valid return data for driver information

if your looking for command that can return version of dll you can use this FileGetVersion("uuirtdrv.dll")

and quick look at other code confirm it

if (drvVersion != 0x0100)
{
LoggerWrapper::GetInstance()->Write(LV_CRITICAL,"ERROR: Invalid uuirtdrv version!n");
Sleep(1000);
unLoadDLL();
return 0;
}

btw 0x0100 = 256 ;)

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.

 

Share this post


Link to post
Share on other sites

Add another dimension to the array...... Maybe more information is being returned?

Share this post


Link to post
Share on other sites

no, return value is ok, edited upper post


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.

 

Share this post


Link to post
Share on other sites

THX!!!

Share this post


Link to post
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
Sign in to follow this  
Followers 0