Source code of Windows XP (NT5)
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
1.9 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 apMimeMaps[];
  39. };
  40. //
  41. // Collection of TFormmatedMultiSz's
  42. //
  43. struct TFormattedMultiSzData
  44. {
  45. static TFormattedMultiSz CustomErrorDescriptions;
  46. static TFormattedMultiSz HttpCustomHeaders;
  47. static TFormattedMultiSz HttpErrors;
  48. static TFormattedMultiSz ScriptMaps;
  49. static TFormattedMultiSz SecureBindings;
  50. static TFormattedMultiSz ServerBindings;
  51. static TFormattedMultiSz MimeMaps;
  52. static TFormattedMultiSz* apFormattedMultiSz[];
  53. static TFormattedMultiSz* Find(ULONG i_dwPropId)
  54. {
  55. DBG_ASSERT(apFormattedMultiSz != NULL);
  56. for(ULONG i = 0; apFormattedMultiSz[i] != NULL; i++)
  57. {
  58. if(i_dwPropId == apFormattedMultiSz[i]->dwPropId)
  59. {
  60. return apFormattedMultiSz[i];
  61. }
  62. }
  63. return NULL;
  64. }
  65. };
  66. #endif // _multiszdata_h_