Casting a 64 bit pointer to a 32 bit DWORD gave 2 warnings. Solved by storing the actual DWORD in the registry table. Would have preferred to use a union, but C++ doesn't let you initialize anything other than the first field, and C99 style initializers are not supported until C++20, so this solution will have to do until then.