Sign in to follow this  
Followers 0
jueki

using a .dll with AutoIT3 - need help converting code

9 posts in this topic

hi all,

i am trying to use this function in AutoIT, but i have absolutely no knowledge about any other programming language so i can not convert the code myself :D

i would appreciate any help i can get with this.

VB.net:

Private Declare Ansi Sub sSelectedName Lib "FFACE.dll" Alias "GetSelectedItemName" (ByVal buffer As Byte(), ByRef size As Integer)
        Public Shared Function SelectedItemName() As String
            Dim s As Integer = 20
            Dim b(20) As Byte
            sSelectedName(b, s)
            Return System.Text.Encoding.ASCII.GetString(b, 0, s - 1)
        End Function

here are two url's for better information:

GetSelectedItemName

Importing FFACE.dll Functions

how can i, for example, create a msg box with the item name displayed by the function GetSelectedItemName using FFACE.dll?

sorry if my english is hard to understand, but i try my best to explain my situation.

I also attached the FFACE.dll along with a .lib file.

FFACE3126_Dll.rar

Share this post


Link to post
Share on other sites



$ItemName=DllCall("FFACE.dll","str","GetSelectedItemName","byte",$buffer,"int*",$size)
MsgBox(0,"Name",$ItemName)

This should be correct, although it bascically a shot in the dark

Share this post


Link to post
Share on other sites

thanks for your reply,

but when i compile it, it says $buffer and $size is possibly used before declaration..

if i add a Global $buffer, $size on top of the script and run it, then the program crashes because of msvcr80.dll.. :D

Share this post


Link to post
Share on other sites

those are the parameters...as in they are variables to be used in the function call, or the 's' and 'b' variables you use in visual basic. You have to provide something there...

Share this post


Link to post
Share on other sites

and how would i know what to provide there? i havent worked with any dll calls yet, sorry

Share this post


Link to post
Share on other sites

sorry for bumping this, but is there anyone else able to assist me?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

and how would i know what to provide there? i havent worked with any dll calls yet, sorry

Did you try the values from your VB.net example?? :D Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

yup, i have. this is what i tried:

$buffer = 20
$size = 20
$ItemName=DllCall("FFACE.dll","str","GetSelectedItemName","byte",$buffer,"int*",$size)
MsgBox(0,"Name",$ItemName)

same error, msvcr80.dll :D

Share this post


Link to post
Share on other sites

You are not the first multiplayer cheater around here.

Do a forum search for FFACE and you'll get your answer.


"be smart, drink your wine"

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