Changing this code was straightforward:
This:
S_COPY_PACKET* pCopyPacket = (S_COPY_PACKET*)(pCopyDataStruct->lpData);
Becomes:
S_COPY_PACKET* pCopyPacket = static_cast<S_COPY_PACKET*>(pCopyDataStruct->lpData);
But what about this line:
if (SendMessageTimeout(hOtherInstance, WM_COPYDATA,
                NULL, (LPARAM)(LPVOID)&cds, SMTO_BLOCK, 2000, &dwResult) != 0)
We are passing in a (LPARAM)(LPVOID)&cds. So what is the newer concept (inline with static_cast) for this?
 
    