473,785 Members | 2,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLL Simple Question

Hello VC,

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..

Thank you
Nov 16 '05 #1
16 8653
"News VS.NET ( MS ILM )" <sq**********@h otmail.com> wrote in message
news:uC******** ******@TK2MSFTN GP09.phx.gbl...
Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..


Short answer: you don't.

Longer answer:

You can inspect what a DLL exports (using the MS tools) with this command

dumpbin/exports randomDLL.dll

That gets you the public name of the functions that are exported by name.
Functions may be exported without names. Not all member functions in classes
need to be exported.

In many (all?) cases, it turns out that C++ member functions have names
which are decorated (mangled) by the compiler to include information about
the number and type of arguments and return value. However, C++ compilers
don't use the same decoration scheme. So, if you know the compiler used to
generate the object code you may glean some information but not a lot.

Regards.
Will
Nov 16 '05 #2
Thank Will
I will try it

"William DePalo [MVP VC++ ]" <wi***********@ mvps.org> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
"News VS.NET ( MS ILM )" <sq**********@h otmail.com> wrote in message
news:uC******** ******@TK2MSFTN GP09.phx.gbl...
Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..
Short answer: you don't.

Longer answer:

You can inspect what a DLL exports (using the MS tools) with this command

dumpbin/exports randomDLL.dll

That gets you the public name of the functions that are exported by name.
Functions may be exported without names. Not all member functions in

classes need to be exported.

In many (all?) cases, it turns out that C++ member functions have names
which are decorated (mangled) by the compiler to include information about
the number and type of arguments and return value. However, C++ compilers
don't use the same decoration scheme. So, if you know the compiler used to
generate the object code you may glean some information but not a lot.

Regards.
Will

Nov 16 '05 #3
I have tried to use the dumpbin and all I get the following

C:\Temp>dumpbin/exports "C:\Program Files\SOYO\HW Monitor\itevio. dll"
(null) : error : cannot execute LINK.EXE

"William DePalo [MVP VC++ ]" <wi***********@ mvps.org> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
"News VS.NET ( MS ILM )" <sq**********@h otmail.com> wrote in message
news:uC******** ******@TK2MSFTN GP09.phx.gbl...
Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..
Short answer: you don't.

Longer answer:

You can inspect what a DLL exports (using the MS tools) with this command

dumpbin/exports randomDLL.dll

That gets you the public name of the functions that are exported by name.
Functions may be exported without names. Not all member functions in

classes need to be exported.

In many (all?) cases, it turns out that C++ member functions have names
which are decorated (mangled) by the compiler to include information about
the number and type of arguments and return value. However, C++ compilers
don't use the same decoration scheme. So, if you know the compiler used to
generate the object code you may glean some information but not a lot.

Regards.
Will

Nov 16 '05 #4
News VS.NET ( MS ILM ) wrote:
I have tried to use the dumpbin and all I get the following

C:\Temp>dumpbin/exports "C:\Program Files\SOYO\HW Monitor\itevio. dll"
(null) : error : cannot execute LINK.EXE


You're not running on a properly configured command prompt. It's easiest if
you use the "Visual Studio Command Prompt" shortcut that's installed in the
start menu when you install visual studio. If you did do that and got he
above error, then your Visual Studio installation is messed up somehow.

-cd
Nov 16 '05 #5
Carl Daniel, Thank you very much

After dumpbin/exports "C:\Program Files\SOYO\HW Monitor\itevio. dll"

I get the following: How do I read this, I need to know the function names
that my code can call
I am trying to get the CPU temperature using this Soyo .dll? any ideas?
thank you

Dump of file C:\Program Files\SOYO\HW Monitor\itevio. dll

File Type: DLL

Section contains the following exports for itevio.dll

00000000 characteristics
0 time date stamp Wed Dec 31 16:00:00 1969
0.00 version
1 ordinal base
5 number of functions
5 number of names

ordinal hint RVA name

4 0 0000158D Inb
3 1 0000157C Outb
2 2 000012BF ReadReg
1 3 000012A8 WriteReg
5 4 0000A17C ___CPPdebugHook

Summary

7000 .data
1000 .edata
1000 .idata
1000 .reloc
1000 .rsrc
9000 .text
1000 .tls

"Carl Daniel [VC++ MVP]" <cp******@nospa m.mvps.org> wrote in message
news:Oj******** ******@TK2MSFTN GP12.phx.gbl...
News VS.NET ( MS ILM ) wrote:
I have tried to use the dumpbin and all I get the following

C:\Temp>dumpbin/exports "C:\Program Files\SOYO\HW Monitor\itevio. dll"
(null) : error : cannot execute LINK.EXE
You're not running on a properly configured command prompt. It's easiest

if you use the "Visual Studio Command Prompt" shortcut that's installed in the start menu when you install visual studio. If you did do that and got he
above error, then your Visual Studio installation is messed up somehow.

-cd

Nov 16 '05 #6
"News VS.NET ( MS ILM )" <sq**********@h otmail.com> wrote in message
news:On******** ******@TK2MSFTN GP12.phx.gbl...
I get the following: How do I read this, I need to know the function names that my code can call
I am trying to get the CPU temperature using this Soyo .dll? any ideas?
...
ordinal hint RVA name

4 0 0000158D Inb
3 1 0000157C Outb
2 2 000012BF ReadReg
1 3 000012A8 WriteReg
5 4 0000A17C ___CPPdebugHook


The section above reports that Inb, Outb, ReadReg, WriteReg and
__CPPdebugHook are functions which "clients" of this DLL may call. (The last
export is a clue, I think, that Borland tools were used to link the DLL.).
That does you little good, however as it doesn't speak to calling
conventions or the requirements imposed by those functions.

Now, it may be a violation of licensing, but one thing that you can do to
further your investigation is to build set break points at those functions
to get a feel for what is being passed into, and returned from, those
functions. The column labeled RVA gives the "relative virtual address" of
the functions which is the offset from the base of the DLL.

Another hack is to build a DLL in assembly language with the same name and
with the same set of "naked exports" (one's with neither prolog nor epilog).
Those exports would do little more than load the real DLL and jump to the
corresponding export in the original DLL. Note that I said jump and not
call. That's because you don't want to muck with the stack until you
understand how parameters are passed on the stack before the call and how
they are popped off after the call. The advantage here to doing this is that
it is easier to set breakpoints in code you wrote with your development
environment than to set them in someone else's binary where all you have is
an address.

<aside>
I did this once and I can tell you that it is not fun. :-(
</aside>

Regards,
Will
Nov 16 '05 #7
"News VS.NET ( MS ILM )" wrote:

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..


Depends will give the friendliest output for straight C++, since it
will decode C++ name mangling.

The OLE/COM object viewer will do a fine job with a COM type library,
which many COM dlls will have attached.

--
Craig Powers
MVP - Visual C++
Nov 16 '05 #8
Will,

You are a person endowed with transcendent mental superiority.
You blew my mind away.
I am trying to get the cpu temperature. I was hoping that the soyo .dll will
give me the function I need as is
Thank you for your experties you defenetly tought me something
I don't know how long it will take me to figure it out or find a simpler
solution
Thanks again Will.
"William DePalo [MVP VC++ ]" <wi***********@ mvps.org> wrote in message
news:eO******** ********@TK2MSF TNGP12.phx.gbl. ..
"News VS.NET ( MS ILM )" <sq**********@h otmail.com> wrote in message
news:On******** ******@TK2MSFTN GP12.phx.gbl...
I get the following: How do I read this, I need to know the function names
that my code can call
I am trying to get the CPU temperature using this Soyo .dll? any ideas?
...
ordinal hint RVA name

4 0 0000158D Inb
3 1 0000157C Outb
2 2 000012BF ReadReg
1 3 000012A8 WriteReg
5 4 0000A17C ___CPPdebugHook


The section above reports that Inb, Outb, ReadReg, WriteReg and
__CPPdebugHook are functions which "clients" of this DLL may call. (The

last export is a clue, I think, that Borland tools were used to link the DLL.).
That does you little good, however as it doesn't speak to calling
conventions or the requirements imposed by those functions.

Now, it may be a violation of licensing, but one thing that you can do to
further your investigation is to build set break points at those functions
to get a feel for what is being passed into, and returned from, those
functions. The column labeled RVA gives the "relative virtual address" of
the functions which is the offset from the base of the DLL.

Another hack is to build a DLL in assembly language with the same name and
with the same set of "naked exports" (one's with neither prolog nor epilog). Those exports would do little more than load the real DLL and jump to the
corresponding export in the original DLL. Note that I said jump and not
call. That's because you don't want to muck with the stack until you
understand how parameters are passed on the stack before the call and how
they are popped off after the call. The advantage here to doing this is that it is easier to set breakpoints in code you wrote with your development
environment than to set them in someone else's binary where all you have is an address.

<aside>
I did this once and I can tell you that it is not fun. :-(
</aside>

Regards,
Will

Nov 16 '05 #9
Craig,

Depends? Sorry I am not familiar with.
Can you please give more info
Thank you for your help

"Craig Powers" <en****@hal-pc.org> wrote in message
news:3F******** ******@hal-pc.org...
"News VS.NET ( MS ILM )" wrote:

Given a non-DotNET dll from some unknown place
How do I know the classes in it, or how do I view the classes, methods,
properties etc..


Depends will give the friendliest output for straight C++, since it
will decode C++ name mangling.

The OLE/COM object viewer will do a fine job with a COM type library,
which many COM dlls will have attached.

--
Craig Powers
MVP - Visual C++

Nov 16 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3293
by: gene.ellis | last post by:
Good morning. I am racking my brains over what seems like should be a simple question. I have a string that contains text and html. Basically, I would like to grab the HTML tags from the string and wrap some comment tags around it. Does anyone know how I would do this? I was thinking about using the str_replace function, but this won't work for certain html tags, such as <A href=#"> since the "#" won't be known beforehand. Maybe a simple...
2
1683
by: Kirk | last post by:
A very simple question for anyone who knows their HTML tags and attributes. Is there an atribute that I can use to hide the white space around a table which I have used to fill an entire page? I have already tried the following which are un-associated with this white space: CellSpacing="0" CellPadding="0"
2
1818
by: Anurag | last post by:
This simple one beats me all ends up(sincerely). I have been doing DB2 UDB for some time now, reading a lot of good discussions in this forum, writing some answers, asking a lot more but this simple question has floored me completely. Either I pretend that I know or I could let the kowledgable ones pass on some wisdom to me :-) When we say that: (1) "CLP in Db2 V8.2 still imposes a limit of 64K on the stored proc size;
3
2167
by: Peter | last post by:
Hello Thanks for reviewing my question. I would like to know how can I programmatically select a node Thanks in Advanc Peter
1
1043
by: Chris | last post by:
Sorry to ask such a simple question but here it is, and I'm am new to ASP/WEB I am designing a site and I want to make it general so I can easily change the font/color/sizes of the tables/datagrids on the fly. Do I have to load in the scheme I want and adjust every attribute myself or is there a simple way of doing it that I'm missing. I thought maybe the CSS helped with this but I haven't dug into it much. Thanks for the help and...
3
1402
by: Brad | last post by:
I have another hopefully simple question. I am so used to writing VB .Net windows apps that there are some things in ASP .Net that just does not easily cross over. I know how to pass variables to another form, but how would I do this from one page to another? I am not finding a simple solution. Thanks for the help
7
2289
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request that page like http://machinename/dir1/hellp.aspx instead of running that page it starts downloding ...whats missing here ....why the aspx engine not running the page....
2
1176
by: Allain Bøge | last post by:
It is really a simple question. Visual Basic .NET (2003) I create 2 forms (Form1 and Form2) I create a checkbox in Form1 (checkbox1) I create a checkbox in Form2 (checkbox1) I go to Form1 doubleclick on checkbox1 and alters the code
13
1860
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql query: OleDbDataAdapter1.SelectCommand.CommandText = & _ "Select illNameE From tblIllness" OleDbDataAdapter1.Fill(DsIllness1) But in my datagrid, I get (null) for other ccolumns instead
17
2468
by: AlBen | last post by:
Hello sorry I don't know about javascript but I have to finish my work and there I have some scripts on my page I have a textarea form and a select form when a user click in the select form I need the text of the selection apears in my textare form that's all
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.