Is it possible to get all the functions implemented in a dll? I want to get the list of functions implemented in a dll in an array. If it is possible please help me out.
Thanks petxolobo for your reply. But this only give a pointer to the function at that specific ordinal. I want to get the function name/names. Is there any other way.
Well, it's there. You can easily check it if you look at a lib file under \epoc32\release\<platform\<build> directory (e.g. avkon.lib). You can see that the exported methods and classnames are there, you "just" need to get them somehow. It's even possible to get the type of the arguments one method accepts, however, don't expect to see the argument names, too.
Although I've never heard such a tool that does this kind of task, but I wouldn't be surprised if someone said he had already found one.
if dll is build for arm then u won't be able to get names of exported functions .. this is because functions are exported in symbian by ordinal and not by name.
Khm, I've just checked a few lib files built for arm and thumb and they both contained function names.
In any case, I guess it would be enough for our fellow to get the method names even from a wins build and then use that information in his/her code in any build.
ofcourse the lib-file contains the function names.
How else would the compiler know where to find them? magic?
When building a dll, you get a lib/dll pair, where the dll in release mode, does not contain any function names, but only a table of pointers. The lib-file then contains the link between name and ordinal that the compiler uses when linking your binary.
The only problem is that they are "mangled" the c++-way. (its how c++ implements namespaces and function overloads).
There is "demanglers" out there, I know I have seen links to one before on this forum, try search a bit.
the lib from sdk contains names of exported functions ... but unfortunately this libs are not complet ... if u take let's say euser.dll from phone and do a dump bin on it u will see many exports.. much more than euser.lib from sdk provides.
Hi All, Thanks for your replies. But still i not able to get the exported function names from a dll. Using RLibrary::Fullname() i am getting the dll name.... But still i don't know wat to use for getting the function name. I am using series 60 fp2 2nd edition. Building for wins. thanks, max_i
Thanks puterman for your reply. And wat about the lib file. It contains the function name and the ordinals rite! Can i access it. If yes, how? Thanks, max_i
It seems we were not clear enough. You have to find a tool that does this job for you. Symbian and its toolset included in any SDKs do not make it possible. You have to look for such a tool on the internet.
Thanks tote for your reply.. Yeah i got what you said earlier. Actually i want to do it without a tool. using an API(if it's there). But i guess it's not support. But the tool will also use some API or something to access and get the exported function rite? Anyway thanks for the information, max_i
THAT tool is not necessarily written in Symbian C++, but in any other programming language on any other operating system. I bet that such will be (or already has been) written in another programming language/OS than Symbian (C++).
Microsoft (R) COFF Binary File Dumper Version 6.00.8447 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Dump of file euser.lib
File Type: LIBRARY
   Exports
    ordinal  name
     1663  ??0?$CArrayFixFlat@H@@QAE@H@Z (public: __thiscall CArrayFixFlat<int>::CArrayFixFlat<int>(int))      1664  ??0?$CArrayFixFlat@VTUid@@@@QAE@H@Z (public: __thiscall CArrayFixFlat<class TUid>::CArrayFixFlat<class TUid>(int))        2  ??0CActive@@IAE@H@Z (protected: __thiscall CActive::CActive(int))        3  ??0CActiveScheduler@@QAE@XZ (public: __thiscall CActiveScheduler::CActiveScheduler(void))        4  ??0CArrayFixBase@@IAE@P6APAVCBufBase@@H@ZHH@Z (protected: __thiscall CArrayFixBase::CArrayFixBase(class CBufBase * (__cdecl*)(int),int,int))        5  ??0CArrayPakBase@@IAE@P6APAVCBufBase@@H@ZH@Z (protected: __thiscall CArrayPakBase::CArrayPakBase(class CBufBase * (__cdecl*)(int),int))        6  ??0CArrayVarBase@@IAE@P6APAVCBufBase@@H@ZH@Z (protected: __thiscall CArrayVarBase::CArrayVarBase(class CBufBase * (__cdecl*)(int),int))        7  ??0CAsyncCallBack@@QAE@ABVTCallBack@@H@Z (public: __thiscall CAsyncCallBack::CAsyncCallBack(class TCallBack const &,int))        8  ??0CAsyncCallBack@@QAE@H@Z (public: __thiscall CAsyncCallBack::CAsyncCallBack(int))        9  ??0CAsyncOneShot@@QAE@H@Z (public: __thiscall CAsyncOneShot::CAsyncOneShot(int))       10  ??0CBase@@IAE@XZ (protected: __thiscall CBase::CBase(void))       11  ??0CBitMapAllocator@@IAE@HH@Z (protected: __thiscall CBitMapAllocator::CBitMapAllocator(int,int))       12  ??0CBufBase@@IAE@H@Z (protected: __thiscall CBufBase::CBufBase(int))
This hase been retreived using DumpBin supplied from Microsoft Visual Studio. It is not freeware however and comes with Visual Studio, but a quick search at Google threw up a bunch of other alternatives. For example LibDump 1.0 which I havn´t tried so you have to try it on your own.
Good luck and please post back so that we can know if this was what you were looking forÂ
Forum posts: 104
Give this article a look
http://www.newlc.com/How-to-dump-DLL-exports-using-LIB.html
this should give you the exported methods. I don´t know if there is a way to get hold of the non-exported methods.
Also i´m not sure if this is what you need as you mention that you want the info in an array but maybe it´ll help you out. Â
Best regards
PL
Forum posts: 278
But this only give a pointer to the function at that specific ordinal.
I want to get the function name/names.
Is there any other way.
thanks,
max_i
Forum posts: 723
Although I've never heard such a tool that does this kind of task, but I wouldn't be surprised if someone said he had already found one.
tOtE
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 206
guda
Forum posts: 723
In any case, I guess it would be enough for our fellow to get the method names even from a wins build and then use that information in his/her code in any build.
Tote
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 1246
How else would the compiler know where to find them? magic?
When building a dll, you get a lib/dll pair, where the dll in release mode, does not contain any function names, but only a table of pointers.
The lib-file then contains the link between name and ordinal that the compiler uses when linking your binary.
The only problem is that they are "mangled" the c++-way. (its how c++ implements namespaces and function overloads).
There is "demanglers" out there, I know I have seen links to one before on this forum, try search a bit.
Forum posts: 206
guda
Forum posts: 278
Thanks for your replies.
But still i not able to get the exported function names from a dll.
Using RLibrary::Fullname() i am getting the dll name....
But still i don't know wat to use for getting the function name.
I am using series 60 fp2 2nd edition. Building for wins.
thanks,
max_i
Forum posts: 174
http://ptrmobile.blogspot.com/
Forum posts: 278
And wat about the lib file.
It contains the function name and the ordinals rite!
Can i access it. If yes, how?
Thanks,
max_i
Forum posts: 723
Tote
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 278
Yeah i got what you said earlier.
Actually i want to do it without a tool. using an API(if it's there). But i guess it's not support.
But the tool will also use some API or something to access and get the exported function rite?
Anyway thanks for the information,
max_i
Forum posts: 723
Tote
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 174
http://ptrmobile.blogspot.com/
Forum posts: 33
Microsoft (R) COFF Binary File Dumper Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Dump of file euser.lib
File Type: LIBRARY
   Exports
    ordinal  name
     1663  ??0?$CArrayFixFlat@H@@QAE@H@Z (public: __thiscall CArrayFixFlat<int>::CArrayFixFlat<int>(int))
     1664  ??0?$CArrayFixFlat@VTUid@@@@QAE@H@Z (public: __thiscall CArrayFixFlat<class TUid>::CArrayFixFlat<class TUid>(int))
       2  ??0CActive@@IAE@H@Z (protected: __thiscall CActive::CActive(int))
       3  ??0CActiveScheduler@@QAE@XZ (public: __thiscall CActiveScheduler::CActiveScheduler(void))
       4  ??0CArrayFixBase@@IAE@P6APAVCBufBase@@H@ZHH@Z (protected: __thiscall CArrayFixBase::CArrayFixBase(class CBufBase * (__cdecl*)(int),int,int))
       5  ??0CArrayPakBase@@IAE@P6APAVCBufBase@@H@ZH@Z (protected: __thiscall CArrayPakBase::CArrayPakBase(class CBufBase * (__cdecl*)(int),int))
       6  ??0CArrayVarBase@@IAE@P6APAVCBufBase@@H@ZH@Z (protected: __thiscall CArrayVarBase::CArrayVarBase(class CBufBase * (__cdecl*)(int),int))
       7  ??0CAsyncCallBack@@QAE@ABVTCallBack@@H@Z (public: __thiscall CAsyncCallBack::CAsyncCallBack(class TCallBack const &,int))
       8  ??0CAsyncCallBack@@QAE@H@Z (public: __thiscall CAsyncCallBack::CAsyncCallBack(int))
       9  ??0CAsyncOneShot@@QAE@H@Z (public: __thiscall CAsyncOneShot::CAsyncOneShot(int))
      10  ??0CBase@@IAE@XZ (protected: __thiscall CBase::CBase(void))
      11  ??0CBitMapAllocator@@IAE@HH@Z (protected: __thiscall CBitMapAllocator::CBitMapAllocator(int,int))
      12  ??0CBufBase@@IAE@H@Z (protected: __thiscall CBufBase::CBufBase(int))
This hase been retreived using DumpBin supplied from Microsoft Visual Studio.
It is not freeware however and comes with Visual Studio, but a quick search at Google threw up a bunch of other alternatives. For example LibDump 1.0 which I havn´t tried so you have to try it on your own.
Good luck and please post back so that we can know if this was what you were looking forÂ