Re: How to get imagebase after a DLL gets loaded



"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1165028446.450285.126300@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Well, I thought the OP made it clear that DLL is not yet loaded at the
time when he wants to do things.

It wasn't all that clear to me what his issue was.

In fact, the step you have mentioned is appropriate only if you don't
know the names of the modules that are loaded into your address space

That's a fairly pedantic statement. I use the function in places where I
don't want either to pass the instance handle as a parameter to a function
or make the handle global on style grounds.

For example, if I have a function in a DLL to display a dialog whose
template resides in the DLL, the function I export will not have an instance
handle parameter to make the client's life easy. In the grand scheme of
things, an extract call to a single kernel function is not something I'll
obsess about in an _interactive_ application. YMMV.

Regards,
Will


.