I'm trying to convert the C++ code snippet below to Delphi:
DWORD n;
memcpy(&n, lpData, sizeof(n)); <==== the C++ data type : LPBYTE lpData = NULL;
wprintf(L"REG_DWORD - ValueName: %s, Data: %u\n", pValueName, n);
I do not know the Delphi part, I've tried some code as below:
lpData: array of byte;
n : DWord;
// then do not know how to use
procedure CopyMemory(Destination: Pointer; Source: Pointer; Length: NativeUInt);
Here is the most difficult part to me:
I don't know how to convert
lpDatato a pointer.variable
Destinationtype isPByte, or not?How to get the length?
How to convert the destination value to
n(Dwordtype value)?