F
first10
Hello,
Apologies for being slightly off topic - but this group seems the best
fit for the question.
How does the compiler handle the problem of not knowing which address a
DLL will be loaded at when it tries to resolve calls to virtual
functions via the vtable?
Does the vtable hold pointers relative to itself or to the dll in which
it resides?
If the compiler places absolute memory addresses in the vtable there is
no guarantee these will be correct when the dll is loaded at a
different address than expected?
I am trying to write a COM client "manually" without using windows api
or vc++ compiler features as a learning exercise - I think I am missing
a bit of pointer arithmetic to get the last step to work.
All the best,
John
Apologies for being slightly off topic - but this group seems the best
fit for the question.
How does the compiler handle the problem of not knowing which address a
DLL will be loaded at when it tries to resolve calls to virtual
functions via the vtable?
Does the vtable hold pointers relative to itself or to the dll in which
it resides?
If the compiler places absolute memory addresses in the vtable there is
no guarantee these will be correct when the dll is loaded at a
different address than expected?
I am trying to write a COM client "manually" without using windows api
or vc++ compiler features as a learning exercise - I think I am missing
a bit of pointer arithmetic to get the last step to work.
All the best,
John