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.

88 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. MultiSzHelper.h
  5. Abstract:
  6. Defines the TFormattedMultiSz datatype.
  7. Author:
  8. Mohit Srivastava 22-March-01
  9. Revision History:
  10. --*/
  11. #ifndef _multiszdata_h_
  12. #define _multiszdata_h_
  13. #include <windows.h>
  14. #include <dbgutil.h>
  15. //
  16. // Max Number of fields in a MultiSz
  17. // For example, apServerBindings has 3: IP, Port, Hostname
  18. //
  19. static const ULONG MAX_FIELDS = 10;
  20. struct TFormattedMultiSz
  21. {
  22. DWORD dwPropId;
  23. LPWSTR wszWmiClassName;
  24. WCHAR wcDelim;
  25. LPCWSTR* awszFields;
  26. };
  27. //
  28. // Used as the astrFields parameter of TFormattedMultiSz
  29. //
  30. struct TFormattedMultiSzFields
  31. {
  32. static LPCWSTR apCustomErrorDescriptions[];
  33. static LPCWSTR apHttpCustomHeaders[];
  34. static LPCWSTR apHttpErrors[];
  35. static LPCWSTR apScriptMaps[];
  36. static LPCWSTR apSecureBindings[];
  37. static LPCWSTR apServerBindings[];
  38. static LPCWSTR apApplicationDependencies[];
  39. static LPCWSTR apWebSvcExtRestrictionList[];
  40. static LPCWSTR apMimeMaps[];
  41. };
  42. //
  43. // Collection of TFormmatedMultiSz's
  44. //
  45. struct TFormattedMultiSzData
  46. {
  47. static TFormattedMultiSz CustomErrorDescriptions;
  48. static TFormattedMultiSz HttpCustomHeaders;
  49. static TFormattedMultiSz HttpErrors;
  50. static TFormattedMultiSz ScriptMaps;
  51. static TFormattedMultiSz SecureBindings;
  52. static TFormattedMultiSz ServerBindings;
  53. static TFormattedMultiSz ApplicationDependencies;
  54. static TFormattedMultiSz WebSvcExtRestrictionList;
  55. static TFormattedMultiSz MimeMaps;
  56. static TFormattedMultiSz* apFormattedMultiSz[];
  57. static TFormattedMultiSz* Find(ULONG i_dwPropId)
  58. {
  59. DBG_ASSERT(apFormattedMultiSz != NULL);
  60. for(ULONG i = 0; apFormattedMultiSz[i] != NULL; i++)
  61. {
  62. if(i_dwPropId == apFormattedMultiSz[i]->dwPropId)
  63. {
  64. return apFormattedMultiSz[i];
  65. }
  66. }
  67. return NULL;
  68. }
  69. };
  70. #endif // _multiszdata_h_