开发者

GetProcAddress an Class object without header file

It should be possible to get an class object from an dll without the corresponding dll header file!? But 开发者_运维技巧how can I make the typedef of the class for GetProcAddress without known type from header file?

Have you an example?!

Thanks and greets,

leon22


GetProcAddress gives you the address of a function. When you have the full decorated name of a C++ class member function, you can get the address of it. With the same information you can get the signature of the method with the undname utility.

But you will need the header file to get class definition itself.


If you don't know the types involved, you can't call a function, and that's pretty much the end of that.


If I understand your question correctly, you want the address of an object (i.e. an instance) in the DLL. GetProcAddr won't give you that, but it can give you the address of a function that can, in turn, give you the address of the object, if such a function exists in the DLL. if that function has extern "C" linkage, there won't be any name mangling either.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜