Jump to content

using a .dll with AutoIT3 - need help converting code


 Share

Recommended Posts

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

Link to comment
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

Link to comment
Share on other sites

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
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...