Jump to content
Sign in to follow this  
burners

Please help me work with a DLL

Recommended Posts

burners

I know you guys have seen this a million times and I searched but still couldn't get this to work. I feel like such a rookie but I suppose I am since I don't know this,

The DLL is FFACE I think some of you have heard of it before, it helps to read memory from FFXI the MMO Game. I have been able to use the DLL for simple things like when the result is an integer but now I'm looking to work with strings and can't seem to get it, There are some examples in VB and C on the site but I still can't make heads or tails of it. I don't have a full script as an example but this is what I have been working with for testing.

PS my end goal is to read the chat and then help the player translate some of it using the internet because the game is mixed NA, JP and a few other nationalities.

This is in C#

[DllImport("FFACE.dll", EntryPoint = "GetChatLine")]
private static extern void _GetLine(short index, byte[] buffer, ref int size);
public static string GetLine(short index)
{
byte[] buffer = new byte[120];
int size = 120;

_GetLine(index, buffer, ref size);

return Encoding.ASCII.GetString(buffer, 0, size - 1);
}

This is a similar function in VB.net

Private Declare Ansi Sub sExtra Lib "FFACE.dll" Alias "GetChatLineEx" (ByVal index As Short, ByVal buffer As Byte(), ByRef size As Integer, ByRef ex As CHATEXTRAINFO)
Public Structure CHATEXTRAINFO
    Dim MessageType As Short
End Structure
Public Structure ChatLogEntry
    Dim LineText As String
    Dim LineType As Short
End Structure
Public Shared Function GetLine(ByVal index As Short) As ChatLogEntry
            Dim s As Integer = 200
            Dim r As ChatLogEntry
            Dim ex As CHATEXTRAINFO
            Dim b(200) As Byte
            sExtra(index, b, s, ex)
            If s = 0 Then
                r.LineText = ""
                r.LineType = 0
                Return r
            End If
            r.LineText = System.Text.Encoding.GetEncoding(932).GetString(b, 0, s - 1)
            r.LineType = CType(ex.MessageType, eChatMode)
            Return r
        End Function

Any help would be greatly appreciated, I have been banging my head for days on this.


~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK

Share this post


Link to post
Share on other sites
burners

I cant seem to edit my post, What I am looking for is how to do the above examples in AutoIT. Sorry if I wasn't clear in my original post.


~~--Feel Free to Steal my Sigs --~~FLAT LOOK____________________________________ROUNDED LOOK

Share this post


Link to post
Share on other sites
Melba23

burners,

Please read the Forum Rules - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×