Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Need mangled names for command.txt file

Author
Message
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 3rd Mar 2022 01:38
Hi,

I'm working on a dll and need mangled names to put into the command.txt file, but Dependency Walker doesn't work for me, it goes unresponsive and freezes. My dll was made in PureBasic. Does anyone else know what I can use or how I can get the mangled names? I'm using windows 10 64 bit and using PureBasic x86
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 3rd Mar 2022 04:34
Explain more on what mangled names is?
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 3rd Mar 2022 04:57
Are you using the old dependency walker cause that won’t run on windows 10. If u are then you may try the open source version here. https://github.com/lucasg/Dependencies. I believe I was able to get it to work under windows 10 but it’s been awhile since I needed to use it.
Bored of the Rings
User Banned
Posted: 3rd Mar 2022 05:14 Edited at: 3rd Mar 2022 05:15
Remove 'extern "c"' in code which prevents mangling. And dependency walker works fine on windows 10 make sure you downloaded the correct version and run as admin
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 3rd Mar 2022 07:03
From my experience, I can say that dependency walker takes a very long time to read a dll.
It can take up to 5 minutes depending on the size of the dll.
Otherwise, I also recommend what BotR suggested, to suppress the manipulated names.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Bored of the Rings
User Banned
Posted: 3rd Mar 2022 09:01 Edited at: 3rd Mar 2022 09:49
yes, agreed, Depend Walker is sloooow, Also, play around with Visual Studio dumpbin command e.g. for dependencies etc
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 3rd Mar 2022 13:29
Quote: "Are you using the old dependency walker cause that won’t run on windows 10. If u are then you may try the open source version here. https://github.com/lucasg/Dependencies. I believe I was able to get it to work under windows 10 but it’s been awhile since I needed to use it.
"


Yes, I didn't know about a newer version. I'll try the github one.

Quote: "Remove 'extern "c"'"


I will definitely turn it off

Quote: "play around with Visual Studio dumpbin command"


I'll try that too

Thank you all for your advice and knowledge


Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Mar 2022 00:03 Edited at: 4th Mar 2022 00:26
@Game_Code_here

Here is an explanation of what name mangling is.

https://en.m.wikipedia.org/wiki/Name_mangling
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 4th Mar 2022 02:06
Quote: "Here is an explanation of what name mangling is."


Wow, I learned something new today, I know nothing about dlls.

I do not think There is any reason to learn.

Thank you for showing me.
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Mar 2022 11:33
Quote: "Thank you for showing me."


You're welcome
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 4th Mar 2022 14:24
If you open the DLL in Notepad., just scroll to the end... there is always a "Garbage Collection" Section (which isn't overly long) then an External Calls (these are Commands called from other DLL) and above that are going to be your Commands.

Mind if you're trying to quickly find the section., just press F3 and type in the name of your plug-in (not what you rename it for AGK., as obviously you have to rename based on platform, but what you originally exported it as... "MyLibrary.DLL" or w/e)

Still as a note., there isn't a need to Decorate Commands unless you're using Multiple for a Single Command.
i.e.

CreateColor( uint32_t Color )
CreateColor( uint8_t R, uint8_t G, uint8_t B )
CreateColor( uint8_t R, uint8_t G, uint8_t B, uint8_t A )

The would then become decorated ("mangled") within the C++ Export table and perhaps export as:
?CreateColor@@YAHXZ ?CreateColor@@YAXHHH ?CreateColor@@YAXHHHH

We can then add these to the command table linked to the same Command in AGK
i.e.
CreateColor, I, I, ?CreateColor@@YAHXZ
CreateColor, I, III, ?CreateColor@@YAXHHH
CreateColor, I, IIII, ?CreateColor@@YAXHHHH

Then within AppGameKit we have 3 Variations of the same Command... this isn't something we can do in C however because it doesn't have Overloading (introduced in C++)., hence the name decoration.
I've not used PureBasic in probably 15 years., frankly it's less of a headache to simply use Microsoft C/C++ but as I recall originally it ONLY exported Undecorated Commands (i.e. C Compatible); but then they added C++ Decorated Support., and this became the default; but by adding "C" to the end of the Procedure Command it switched it back to the original C (undecorated) output.
Unseen Ghost
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Mar 2022 23:37
Quote: "If you open the DLL in Notepad., just scroll to the end... there is always a "Garbage Collection" Section (which isn't overly long) then an External Calls (these are Commands called from other DLL) and above that are going to be your Commands."


I'll have to get use to what is there. I'm looking at the end now LOL
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex/AGK2/AGKStudio

No one cares how much you know until they know how much you care.

Login to post a reply

Server time is: 2024-03-28 20:46:46
Your offset time is: 2024-03-28 20:46:46