Boost logo

Boost :

From: Roland (roland.schwarz_at_[hidden])
Date: 2003-12-18 02:50:38


(Jeremy Maitin-Shepard <jbms_at_[hidden]>) wrote:

> Instead of a writing to a file, another (less portable) method is to
> modify the process's memory (in place), such that it appears to Windows
> that some DLL has been loaded, and then this DLLs cleanup code is run
> when the process exits.

Hmm, yes. I considered this. The problem there is that you cannot use
the LoadLibrary API call, which beneath doing the fixups, registers the
DLL into the process. As I understood from various postings in other
groups, it should be possible in principle to mimic the behaviour
of LoadLibrary, but did not see any sample code nor did I find a way
to register the DLL into the process space by other means.

It would be nice to be able to call LoadLibrary with a file handle
instead of a file name string, so one could use virtual memory files.
But nope.

The closest I came upon was a discussion about self contained
applet code, that has some embedded third party DLL code. This
way the downloaded App would not need to access the client computers
disk which is desirable. But the thread ended without coming up
with a solution.

> I believe a technique similar to this is used
> by various ``cheat''-prevention systems added to certain multiplayer
> games. This would have the advantage of not using a temporary file.

This would be great. Do you remember where you have seen this?

Roland


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk