Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
3.7 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. #define SetupPIDGenEx SetupPIDGenExW
  12. #else
  13. #define SetupPIDGen SetupPIDGenA
  14. #define SetupPIDGenEx SetupPIDGenExA
  15. #endif // UNICODE
  16. #else
  17. #include <string.h>
  18. #include <compobj.h>
  19. typedef BOOL NEAR *PBOOL;
  20. typedef BOOL FAR *LPBOOL;
  21. typedef FILETIME FAR *LPFILETIME;
  22. #define SetupPIDGenA SetupPIDGen
  23. #define SetupPIDGenExA SetupPIDGenEx
  24. #define lstrlenA lstrlen
  25. #define lstrcpyA lstrcpy
  26. #define wsprintfA wsprintf
  27. #define TEXT(s) __T(s)
  28. #define ZeroMemory(pb, cb) memset(pb, 0, cb)
  29. #define CopyMemory(pb, ab, cb) memcpy(pb, ab, cb)
  30. #endif // defined(WIN32) || defined(_WIN32)
  31. BOOL STDAPICALLTYPE SetupPIDGenW(
  32. LPWSTR lpstrSecureCdKey, // [IN] 25-character Secure CD-Key (gets U-Cased)
  33. LPCWSTR lpstrMpc, // [IN] 5-character Microsoft Product Code
  34. LPCWSTR lpstrSku, // [IN] Stock Keeping Unit (formatted like 123-12345)
  35. BOOL fOem, // [IN] is this an OEM install?
  36. LPWSTR lpstrPid2, // [OUT] PID 2.0, pass in ptr to 24 character array
  37. LPBYTE lpbDigPid, // [IN/OUT] pointer to DigitalPID buffer. First DWORD is the length
  38. LPBOOL pfCCP); // [OUT] optional ptr to Compliance Checking flag (can be NULL)
  39. BOOL STDAPICALLTYPE SetupPIDGenA(
  40. LPSTR lpstrSecureCdKey, // [IN] 25-character Secure CD-Key (gets U-Cased)
  41. LPCSTR lpstrMpc, // [IN] 5-character Microsoft Product Code
  42. LPCSTR lpstrSku, // [IN] Stock Keeping Unit (formatted like 123-12345)
  43. BOOL fOem, // [IN] is this an OEM install?
  44. LPSTR lpstrPid2, // [OUT] PID 2.0, pass in ptr to 24 character array
  45. LPBYTE lpbDigPid, // [IN/OUT] pointer to DigitalPID buffer. First DWORD is the length
  46. LPBOOL pfCCP); // [OUT] optional ptr to Compliance Checking flag (can be NULL)
  47. BOOL STDAPICALLTYPE SetupPIDGenExW(
  48. LPWSTR lpstrSecureCdKey, // [IN] 25-character Secure CD-Key (gets U-Cased)
  49. LPCWSTR lpstrMpc, // [IN] 5-character Microsoft Product Code
  50. LPCWSTR lpstrSku, // [IN] Stock Keeping Unit (formatted like 123-12345)
  51. BOOL fOem, // [IN] is this an OEM install?
  52. LPWSTR lpstrPid2, // [OUT] PID 2.0, pass in ptr to 24 character array
  53. LPBYTE lpbDigPid, // [IN/OUT] pointer to DigitalPID buffer. First DWORD is the length
  54. LPBOOL pfCCP, // [OUT] optional ptr to Compliance Checking flag (can be NULL)
  55. LPBOOL pfVL); // [OUT] optional ptr to Volume Licensing flag (can be NULL)
  56. BOOL STDAPICALLTYPE SetupPIDGenExA(
  57. LPSTR lpstrSecureCdKey, // [IN] 25-character Secure CD-Key (gets U-Cased)
  58. LPCSTR lpstrMpc, // [IN] 5-character Microsoft Product Code
  59. LPCSTR lpstrSku, // [IN] Stock Keeping Unit (formatted like 123-12345)
  60. BOOL fOem, // [IN] is this an OEM install?
  61. LPSTR lpstrPid2, // [OUT] PID 2.0, pass in ptr to 24 character array
  62. LPBYTE lpbDigPid, // [IN/OUT] pointer to DigitalPID buffer. First DWORD is the length
  63. LPBOOL pfCCP, // [OUT] optional ptr to Compliance Checking flag (can be NULL)
  64. LPBOOL pfVL); // [OUT] optional ptr to Volume Licensing flag (can be NULL)