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.

DarkBASIC Professional Discussion / Call DLL, function name -> What are the 'random' characters for?

Author
Message
Qqite
16
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 5th Feb 2013 11:29
In the CALL DLL example here


The line

Makes no sense to me. Why wouldn't you just type in the function name rather than all that gibberish. What is the "@@YAHH@Z" for?

Ventures of the worlds around us are limited only by our imagination.
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 5th Feb 2013 12:21
In this example, ?MyFunc@@YAHH@Z is the REAL function name. In user32.dll functions have more clear names, like GetSystemMetrics

*** Merry Chuckmas! ***
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 5th Feb 2013 15:20
Most dll's have there functions decorated, but others don't. Undecorated dll functions generally means that there is no way to find out (the developer could have deliberately hidden them) what parameters the function needs or returns. I even had a nosey through to find out what those letters mean but couldn't find anything proper. But, from what I know, they are the return value/type and the parameters that the function requires.

This explains a bit more about the why's...:
http://www.codeproject.com/Articles/36120/Understanding-DLLs-Building-them-and-Allowing-Exte

And here's where you can download a simple utility that opens and views everything inside a dll...:
http://www.dependencywalker.com/

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2026-07-07 00:31:43
Your offset time is: 2026-07-07 00:31:43