SturmGhost

Read mumble link structure

2 posts in this topic

#1 ·  Posted (edited)

I got a game which has mumble  link integrated.

Just for clearence: Accessing the structure is allowed by game-developers. Reference: here, here and here.

I got a code snipped for C# but I'm not able to rewrite the code for AutoIT.

public static void OpenMumbleLink()
        {
            // Open the mapped memory file
            mappedFile = MemoryMappedFile.CreateOrOpen("MumbleLink", Marshal.SizeOf(data));
            accessor = mappedFile.CreateViewAccessor(0, Marshal.SizeOf(data));
        }

        public static void GetData()
        {
            // Make sure the map memory file is loaded
            if (mappedFile == null) OpenMumbleLink();

            // Read mapped memory file
            accessor.Read(0, out data);

            unsafe
            {
                fixed (LinkedMem* _data = &data)
                {
                    // Parse info
                    playerInfo.x = (float)(_data->fAvatarPosition[0]) * InchesPerMeter;
                    playerInfo.y = (float)(_data->fAvatarPosition[1]) * InchesPerMeter;
                    playerInfo.z = (float)(_data->fAvatarPosition[2]) * InchesPerMeter;
                    playerInfo.map = (int)_data->context[28] + ((int)_data->context[29] * 256);
                }
            }
        }

How can I access the virtual memory mapped file and store the mumble link structure elements to my own structure?

Could someone help me or give me some hints to do this?

Edited by SturmGhost

Share this post


Link to post
Share on other sites



SturmGhost,

Quote

Just for clearence: Accessing the structure is allowed by game-developers

Just for information: Interacting with a game in any form is not allowed in this forum. Please read the Forum rules before posting again - thread 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.