DWORD baseAddress = (DWORD) GetModuleHandle(NULL);
If I put that code into a DLL and inject it to a process, that seems to equal the base address of the injected process.
How does that work exactly? How does the cast from HMODULE to DWORD work? Would it work if I cast it to void* instead of DWORD?