How do I View the functions inside of DLLs? - dll

Is there a way you can open and view the code in a DLL (i.e., see functions/methods, signatures, and the code inside those functions or methods?)
Is there a way to view any headers inside the DLL as well as the authorship information for a DLL?

for non-.Net windows DLLs, there is this one here:
http://www.dependencywalker.com/

If they are .NET DLLs, you can find out a remarkable amount, including disassembling the code, using redgate's free tool "Reflector" - see http://www.red-gate.com/products/reflector/

I think you will find what you need (and more) in Dependency Walker

Maybe you want to do it programmatically and write your own tool. Then have a look at the import and export tables of the COFF format.
Some other tools with source code doing it are:
Texe and LordPE

As material for my own lectures for Reverse Engineering, I developed PeStudio (www.winitor.net/en/pestudio.html). Using this tool you can snoop many details about imported and exported functions. You can even undecorate these when these have been decorated by a compiler.

Related

Can I use a normal dll or another language package in Ada?

Currently I am using a hardware that provides me a software package that comes from a DLL. They also provide packages in different languages (Java, C++ and Python) with functions from the DLL, so I am programming my app in Java. I would like to change to Ada but I don't know the way to use the DLL functions or the packages that the company offer me in other languages. Is there a way to do it?
I know I can extract the function names from the DLL, but I don't exactly know how to convert that into an Ada package, or if I can use the packages already made in other languages in any way.
The lazy answer is simply "yes". :-)
The GCC documentation on the subject is here: https://gcc.gnu.org/onlinedocs/gnat_ugn/Using-DLLs-with-GNAT.html
As it says, you also need an Ada specification for the functions in the DLL, you want to use. You can either write it by hand, or use gcc -fdump-ada-spec on the C or C++ header files to have one generated automatically. The generated specifications are not always beautiful, but they are more likely to be correct than something you write from scratch yourself.

How can I use a native DLL from C#?

Given a native DLL, with no documentation or anything, and assuming it is not a COM component, is there any way to extract some sort of interface from that DLL so it can be called from C#?
I know about PInvoke, but that requires me to already know the method names and signatures. I don't have those.
Is it even possible?
You can use a PE reading tool to list the exported functions. For example Dependency Walker will do that for you.
There's not a right lot you can do with that information though. There's no metadata with a native DLL that tells you how to call those functions, what their signatures are. Or even what the parameters represent.
Something has gone wrong with this project. A DLL on its own is not enough. You need a header file and some documentation.

Open source runtime form designer

I'm searching for an open source runtime form designer (for SCADA, not searching for html designer), which is somewhat similar to modern IDE WYSIWYG's. So far, my list is empty.
Requirements are crossplatform and C++.
Thanks in advance.
UPDATE:
Currently I'm using wxWidgets as the GUI platform. So the possible solutions are either open-source wxWidgets based form designer, or the wxWidgets component/lib.
UPDATE 2:
Found the wxShapeFramework component which is I was looking for. At the moment this is the only option.
Maybe Qt would satisfy your needs. It is possible to extend it's functionality with new components. It's not out-of-the-box solution, but may fulfill this role.
How about Glade and gtkmm?
Qt allows you to use UI files created with the designer on-the-fly, without compiling them into your applications. You want the QtUiTools module. See: http://www.forum.nokia.com/infocenter/topic/Qt_for_S60_Developers_Library/GUID-ECBE8350-9D54-48D1-B777-264B895B9063/designer-using-a-ui-file.html and http://www.forum.nokia.com/infocenter/topic/Qt_for_S60_Developers_Library/GUID-ECBE8350-9D54-48D1-B777-264B895B9063/qtuitools.html.
I'm going to use wxShapeFramework, which purpose is exactly as described in question (SCADA runtime form designer). Especially because the project is based on wxWidgets.

Zune API ZuneCore.dll

I noticed the other day that the Zune PC Software exposes a type library (ZuneCore.dll). It seems to be related to the WMPLib API in some way but I can't figure out how to use it either from VB6 or C#.
Has anybody tried this and had any luck?
Dave
May be an old question, but this link might help: http://zunelcd.codeplex.com/ If you download the source for this project one of the class libraries is a decent API for communicating with the Zune Software.
i just found out about this -> http://soapitstop.com/blogs/fleamarket/archive/2008/03/03/read-the-zune-collection-in-net-from-zune-s-own-api.aspx but it seems a bit outdated Initialize method now takes some parameters and i dont know what to put there!
Try adding a reference to it from a .NET project in Visual Studio. Perhaps this namespace will appear magically: MicrosoftZuneLibrary

Is there a tool which lists exported methods from a DLL?

As the question states - is there a good tool out there which lists methods an unmanaged DLL exports? I would like it to list COM methods and interfaces too.
For DLLs, use the Dependency Viewer (depends.exe).
For COM objects, use oleview.exe
Take a look at Dependency Walker to get a list of unmanaged functions exported from a DLL.
You can't easily get a l list of COM classes exported from a DLL. What you'd have to do is something like to through the registry and find all objects that reference the DLL in question. DLLs advertise their classes via registration in the registry...
As an application packager we use a utility that monitors (or dumps) the registration information - WiseComCapture.exe - this is part of Wise Package Studio however which isn't free.
It spits out a .reg file of all it's registration information.
A bit of noodling around with google may 'expose' it