From: Wanting2Learn on
Thanks Peter. Now my ProcAdd is OK.

How do I proceed with using the function now?

Thanks agian.

Harry
From: Scott Seligman on
<Wanting2Learn(a)discussions.microsoft.com> wrote:
>
>Thanks Peter. Now my ProcAdd is OK.
>
>How do I proceed with using the function now?

Are you talking about GetDeviceUniqueID?

If so, here's some untested code that might compile. Error
checking is an exercise left up to the reader.

typedef HRESULT (WINAPI *FNGetDeviceUniqueID)(
LPBYTE, DWORD, DWORD, LPBYTE, LPDWORD);
HMODULE hCoreDLL = LoadLibrary(_T("coredll.dll"));
pFNGetDeviceUniqueID GetDeviceUniqueID = (FNGetDeviceUniqueID)
GetProcAddress(hCoreDLL, _T("GetDeviceUniqueID"));

const char * szAppData = "!!My Application Name!!";
BYTE bDeviceID[20] = {0};
DWORD cDeviceID = (sizeof(bDeviceID)/sizeof((bDeviceID)[0]));

HRESULT hr = pGetDeviceUniqueID(
(LPBYTE)szAppData, strlen(szAppData), 1, bDeviceID, &cDeviceID);

// Do something with bDeviceID

--
--------- Scott Seligman <scott at <firstname> and michelle dot net> ---------
Nothing is so permanent as a temporary solution.
-- Ahmad Chalabi