Source code of Windows XP (NT5)

61 lines
2.1 KiB

  1. /*
  2. These routines are used so that syssetup and winnt32 will be able
  3. to call PIDGen with a hardcoded pid for the appropriate select
  4. version.
  5. //marrq want the bottom line?
  6. This header should only be included if pidgen.h was also included
  7. */
  8. #if defined(WIN32) || defined(_WIN32)
  9. #ifdef UNICODE
  10. #define SetupPIDGen SetupPIDGenW
  11. #else
  12. #define SetupPIDGen SetupPIDGenA
  13. #endif // UNICODE
  14. #else
  15. #include <string.h>
  16. #include <compobj.h>
  17. typedef BOOL NEAR *PBOOL;
  18. typedef BOOL FAR *LPBOOL;
  19. typedef FILETIME FAR *LPFILETIME;
  20. #define SetupPIDGenA SetupPIDGen
  21. #define lstrlenA lstrlen
  22. #define lstrcpyA lstrcpy
  23. #define wsprintfA wsprintf
  24. #define TEXT(s) __T(s)
  25. #define ZeroMemory(pb, cb) memset(pb, 0, cb)
  26. #define CopyMemory(pb, ab, cb) memcpy(pb, ab, cb)
  27. #endif // defined(WIN32) || defined(_WIN32)
  28. BOOL STDAPICALLTYPE SetupPIDGenW(
  29. LPWSTR lpstrSecureCdKey, // [IN] 25-character Secure CD-Key (gets U-Cased)
  30. LPCWSTR lpstrMpc, // [IN] 5-character Microsoft Product Code
  31. LPCWSTR lpstrSku, // [IN] Stock Keeping Unit (formatted like 123-12345)
  32. BOOL fOem, // [IN] is this an OEM install?
  33. LPWSTR lpstrPid2, // [OUT] PID 2.0, pass in ptr to 24 character array
  34. LPBYTE lpbDigPid, // [IN/OUT] pointer to DigitalPID buffer. First DWORD is the length
  35. LPBOOL pfCCP); // [OUT] optional ptr to Compliance Checking flag (can be NULL)
  36. BOOL STDAPICALLTYPE SetupPIDGenA(
  37. LPSTR lpstrSecureCdKey, // [IN] 25-character Secure CD-Key (gets U-Cased)
  38. LPCSTR lpstrMpc, // [IN] 5-character Microsoft Product Code
  39. LPCSTR lpstrSku, // [IN] Stock Keeping Unit (formatted like 123-12345)
  40. BOOL fOem, // [IN] is this an OEM install?
  41. LPSTR lpstrPid2, // [OUT] PID 2.0, pass in ptr to 24 character array
  42. LPBYTE lpbDigPid, // [IN/OUT] pointer to DigitalPID buffer. First DWORD is the length
  43. LPBOOL pfCCP); // [OUT] optional ptr to Compliance Checking flag (can be NULL)