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.

115 lines
3.2 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #ifndef _UTILS_H_
  3. #define _UTILS_H_
  4. #include "global.h"
  5. #ifndef TLSPERF
  6. CGlobal * GetGlobalContext(void);
  7. #else
  8. CGlobalPerf * GetGlobalContext(void);
  9. #endif
  10. DWORD ShowProgressBox(HWND hwnd,
  11. DWORD (*pfnThread)(void *),
  12. DWORD dwTitle,
  13. DWORD dwProgressText,
  14. void * vpData = NULL);
  15. DWORD WINAPI ProcessThread(void *pData);
  16. int LRMessageBox(HWND hWndParent,DWORD dwMsgId,DWORD dwCaptionID = 0,DWORD dwErrorCode = 0);
  17. void SetInstanceHandle(HINSTANCE hInst);
  18. HINSTANCE GetInstanceHandle();
  19. //DWORD CheckServerNT5 ();
  20. void SetLSName(LPTSTR lpstrLSName);
  21. DWORD InitGlobal();
  22. DWORD CheckRequieredFields();
  23. BOOL IsLSRunning();
  24. DWORD AuthenticateLS();
  25. DWORD LRGetLastError();
  26. void SetRequestType(DWORD dwMode);
  27. int GetRequestType(void);
  28. TCHAR * SetRegistrationID(void);
  29. TCHAR * GetLicenseServerID(void);
  30. BOOL IsOnlineCertRequestCreated();
  31. DWORD SetLRState(DWORD dwState);
  32. DWORD LSBase64EncodeA(BYTE const *pbIn,DWORD cbIn,CHAR *pchOut,DWORD *pcchOut);
  33. DWORD LSBase64DecodeA(CHAR const *pchIn,DWORD cchIn,BYTE *pbOut,DWORD *pcbOut);
  34. DWORD SetCertificatePIN(LPTSTR lpszPIN);
  35. DWORD PopulateCountryComboBox(HWND hWndCmb);
  36. DWORD GetCountryCode(CString sDesc,LPTSTR szCode);
  37. DWORD PopulateProductComboBox(HWND hWndCmb, ProductVersionType VerType);
  38. DWORD GetProductCode(CString sDesc,LPTSTR szCode);
  39. DWORD PopulateReasonComboBox(HWND hWndCmb, DWORD dwType);
  40. DWORD GetReasonCode(CString sDesc,LPTSTR szCode, DWORD dwType);
  41. DWORD ProcessRequest();
  42. void LRSetLastRetCode(DWORD dwId);
  43. DWORD LRGetLastRetCode();
  44. void LRPush(DWORD dwPageId);
  45. DWORD LRPop();
  46. BOOL ValidateEmailId(CString sEmailId);
  47. BOOL CheckProgramValidity(CString sProgramName);
  48. BOOL ValidateLRString(CString sStr);
  49. extern DWORD SetLSLKP(TCHAR * tcLKP);
  50. extern DWORD PingCH(void);
  51. extern DWORD AddRetailSPKToList(HWND hListView, TCHAR *lpszRetailSPK);
  52. extern void DeleteRetailSPKFromList(TCHAR * lpszRetailSPK);
  53. extern void LoadFinishedFromList(HWND hListView);
  54. extern void LoadUnfinishedFromList(HWND hListView);
  55. extern void LoadFromList(HWND hListView);
  56. extern void UpdateSPKStatus(TCHAR * lpszRetailSPK, TCHAR tcStatus);
  57. extern DWORD SetLSSPK(TCHAR * tcp);
  58. extern DWORD SetConfirmationNumber(TCHAR * tcConf);
  59. extern DWORD PopulateCountryRegionListBox(HWND hWndLst);
  60. extern void ReadPhoneNumberFromRegistry(LPCTSTR lpCountry, LPTSTR lpPhoneNumber, DWORD nBufferSize);
  61. extern DWORD PopulateCountryRegionComboBox(HWND hWndCmb);
  62. extern DWORD ResetLSSPK(void);
  63. extern void SetCSRNumber(TCHAR *);
  64. extern TCHAR * GetCSRNumber(void);
  65. extern void SetWWWSite(TCHAR *);
  66. extern TCHAR * GetWWWSite(void);
  67. extern void SetReFresh(DWORD dw);
  68. extern DWORD GetReFresh(void);
  69. extern void SetModifiedRetailSPK(CString sRetailSPK);
  70. extern void GetModifiedRetailSPK(CString &sRetailSPK);
  71. extern void ModifyRetailSPKFromList(TCHAR * lpszOldSPK,TCHAR * lpszNewSPK);
  72. extern DWORD ValidateRetailSPK(TCHAR * lpszRetailSPK);
  73. extern DWORD GetCountryDesc(CString sCode,LPTSTR szDesc);
  74. void AddHyperLinkToStaticCtl(HWND hDialog, DWORD nTextBox);
  75. void DisplayPrivacyHelp();
  76. DWORD
  77. GetStringIDFromProgramName(
  78. CString& szProgName
  79. );
  80. #endif