x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

How could I make use of undocumented DLL functions?

I dunk for bananas Page Icon Posted 2023-06-12 11:57 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
704
Location:
Europe
Status:
The device I'm using (a TV set top box) has a DLL with plenty of functions that relate to the specific hardware of the system, such as changing the resolution or accessing the LED lights on the front panel of the system.

Sadly these functions are all undocumented, and seem to be adorned by strange characters that I do not understand (in dependency walker), see the screenshot. Other DLLs have the plain DLL exports with no @ characters or anthing

Is there maybe a standard way of figuring out how to make use of these functions? Certain programs in the system call these, so is there a way to view the way they call the DLL and the arguments they use, like a debugger? I would love to be able to modify the front panel or access the front panel

Thank you!

Edited by I dunk for bananas 2023-06-13 12:15 AM




(ss1.jpg)



(ss2.jpg)



Attachments
----------------
Attachments ss1.jpg (99KB - 0 downloads)
Attachments ss2.jpg (93KB - 0 downloads)
 Top of the page
WinCEDev Page Icon Posted 2023-06-17 3:25 PM
#
Avatar image of WinCEDev
Factorite (Senior)

Posts:
76
Location:
Europe
Status:
Hi,

Those are C++ decorated names, containing information about the function.
Fortunately, that also includes the parameters and their types.

To find out what the parameters are, you can use "undname.exe" included with Visual Studio.
There also seem to be some open source alternatives like demumble or msvcfilt.

For example using undname with the first export from your DLL results in the following output:

> undname.exe ?IPSTB_GetvideoInterfaceSCARTTVCRAspectFunction@@YAIPAI@Z Microsoft (R) C++ Name Undecorator Copyright (C) Microsoft Corporation. All rights reserved. Undecoration of :- "?IPSTB_GetvideoInterfaceSCARTTVCRAspectFunction@@YAIPAI@Z" is :- "unsigned int __cdecl IPSTB_GetvideoInterfaceSCARTTVCRAspectFunction(unsigned int *)"


The following Microsoft article describes how decorated names work in more detail: Decorated names.
 Top of the page
Jump to forum:
Seconds to generate: 0.140 - Cached queries : 59 - Executed queries : 10