I am reading Essential COM and have come across the macro "BASE_OFFSET" from chapter 2 of the book, and I really do not understand its syntax or why this is so.
#define BASE_OFFSET(ClassName, BaseName) \
(DWORD_PTR(static_cast<BaseName*>(reinterpret_cast<ClassName*>(0x10000000))) - 0x10000000)
Can someone explain this macro and how do we use it? In fact, the book uses this macro, but since I do not understand it, I do not see its practical use. Thank you so much in advance.
source
share