inside lib and dll
-
Is there a way that we can know all exposed functions and their signatures and exposed data items which dlls and lib files expose, if we donot have any documentation about them, something like resource hacker.
use dumpbin utility Loka Samastha Sukhino Bhavanthu..!!! ( May all beings be happy and free )
-
Is there a way that we can know all exposed functions and their signatures and exposed data items which dlls and lib files expose, if we donot have any documentation about them, something like resource hacker.
You can use DumpBin[^] utility provided by Microsoft. This is console based application You can use "Dependency Walker" which is provided with Visual Studio tools for the same purpose. SaRath.
"Don't Do Different things... Do Things Differently..." Understanding State Pattern in C++ -
Is there a way that we can know all exposed functions and their signatures and exposed data items which dlls and lib files expose, if we donot have any documentation about them, something like resource hacker.
While dumpbin and depends can show the export table, they will not show you the function signatures.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
While dumpbin and depends can show the export table, they will not show you the function signatures.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
If functions are exported as mangled C++ names, Depends can translate those into C++ prototypes.
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
If functions are exported as mangled C++ names, Depends can translate those into C++ prototypes.
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
Michael Dunn wrote:
...Depends can translate those into C++ prototypes.
Return type and argument list included?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
Michael Dunn wrote:
...Depends can translate those into C++ prototypes.
Return type and argument list included?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
Yes, because all that info is encoded into the mangled name. For example:
?ConcatInPlace@CString@WTL@@IAEXHPBD@Z
becomes:protected: void __thiscall WTL::CString::ConcatInPlace(int,char const *)
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
Yes, because all that info is encoded into the mangled name. For example:
?ConcatInPlace@CString@WTL@@IAEXHPBD@Z
becomes:protected: void __thiscall WTL::CString::ConcatInPlace(int,char const *)
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
What DLL is that contained in?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
What DLL is that contained in?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
I just pulled that from a MAP file of one of my apps. I was just demonstrating that the mangled name contains all the info necesary to convert it to a C++ prototype.
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
I just pulled that from a MAP file of one of my apps. I was just demonstrating that the mangled name contains all the info necesary to convert it to a C++ prototype.
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
So does Depends also use said .map file, or how does it generate the function's signature?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
-
So does Depends also use said .map file, or how does it generate the function's signature?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
It's all encoded in the mangled name. You can see for yourself using the undname tool in the PSDK:
F:\>undname -f ?ConcatInPlace@CString@WTL@@IAEXHPBD@Z
Microsoft(R) Windows NT(R) Operating System
UNDNAME Version 5.00.1768.1Copyright (C) Microsoft Corp. 1981-1998?ConcatInPlace@CString@WTL@@IAEXHPBD@Z == protected: void __thiscall WTL::CString::ConcatInPlace(int,char const *)
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
-
It's all encoded in the mangled name. You can see for yourself using the undname tool in the PSDK:
F:\>undname -f ?ConcatInPlace@CString@WTL@@IAEXHPBD@Z
Microsoft(R) Windows NT(R) Operating System
UNDNAME Version 5.00.1768.1Copyright (C) Microsoft Corp. 1981-1998?ConcatInPlace@CString@WTL@@IAEXHPBD@Z == protected: void __thiscall WTL::CString::ConcatInPlace(int,char const *)
--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
Thanks Mike, but that's undname, not Depends.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb