.DLL/.LIB and decorated form functions names.

Windows specific forum
freddix
Enthusiast
Enthusiast
Posts: 100
Joined: Sun Feb 08, 2004 7:22 pm
Location: South France
Contact:

.DLL/.LIB and decorated form functions names.

Post by freddix »

Hi.

Does someone know how we can retrieve the decorated form of a .DLL/.LIB function name when having both a .h include file from C++ with the non decorated form and the .DLL/.LIB ?

Thanks.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
freddix
Enthusiast
Enthusiast
Posts: 100
Joined: Sun Feb 08, 2004 7:22 pm
Location: South France
Contact:

Post by freddix »

nice tool but it does not detect the parameters.
Can you tell me how you did to get the list of commands available in the .LIB file ? With the .DLL commands ?

For example :
Import "Basic2D.lib"
dbRgbGYA() As "?dbRgbG@@YAHK@Z"
EndImport
Should Be :
Import "Basic2D.lib"
dbRgbG( Param1.l ) As "?dbRgbG@@YAHK@Z"
EndImport
Fred
Administrator
Administrator
Posts: 18210
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

If you own the C++ source, just use "extern "C"" before the exported function to avoid decorations.
freddix
Enthusiast
Enthusiast
Posts: 100
Joined: Sun Feb 08, 2004 7:22 pm
Location: South France
Contact:

Post by freddix »

I don't have the C++ source but the include.h file associated to the .lib
(.h contain all parameters type)
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

>> nice tool but it does not detect the parameters.
For CDECL you have to read the header for parameters. Detection only with
stdcall decoration available
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply