C++ and Swapping DLLs?

Started by
2 comments, last by chollida1 18 years, 6 months ago
Hey everyone, I've been looking for a reference that addresses this but haven't found anything even remotely close. Can two DLLs that both have a single class that implements the same interface be swapped for each other after compilation (without recompiling)? If not, is there another way to go about this?
Turring Machines are better than C++ any day ^_~
Advertisement
If I understand what you're asking, then yes.
As long as it's exactly the same interface, yes.

They would also need to be called the same filename (if you link normally). Then the situation is exactly like just having another version of the same DLL.

Mark
yes, that's one way hackers can get around some programs.

Consider a dllwith a method,

bool DoIHavePermission()

you can create your own dll with that method taht returns true always there by circumventing the original dll.

Some directx wrappers do this as a methdod of code injection or for profiling. ie you link with them and they pass the DirectX calls onto the real DirectX wrappers after doing some profiling code.

Cheers
Chris
CheersChris

This topic is closed to new replies.

Advertisement