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.

91 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. strdata.hxx
  5. Abstract:
  6. String Data Class for IIS MetaBase.
  7. Author:
  8. Michael W. Thomas 17-May-96
  9. Revision History:
  10. Notes:
  11. Virtual functions comments in basedata.hxx.
  12. --*/
  13. #ifndef _mlszdata_
  14. #define _mlszdata_
  15. class CMDMLSZData : public CMDBaseData
  16. {
  17. public:
  18. CMDMLSZData(
  19. DWORD dwMDIdentifier,
  20. DWORD dwMDAttributes,
  21. DWORD dwMDUserType,
  22. DWORD dwMDDataLen,
  23. LPSTR pszMDData,
  24. BOOL bUnicode = FALSE)
  25. :
  26. CMDBaseData(dwMDIdentifier,
  27. dwMDAttributes,
  28. dwMDUserType),
  29. m_mlszMDData (pszMDData,
  30. bUnicode,
  31. ((bUnicode) ? (dwMDDataLen / (DWORD)sizeof(WCHAR)) : (dwMDDataLen)))
  32. /*++
  33. Routine Description:
  34. Constructor for a string object.
  35. Arguments:
  36. MDIdentifier - The Identifier of the data object.
  37. MDAttributes - The data object attributes.
  38. MDUserType - The data object User Type.
  39. MDDataLen - The number of bytes in MDData.
  40. MDData - The binary data.
  41. Return Value:
  42. --*/
  43. {};
  44. virtual PVOID GetData(BOOL bUnicode = FALSE)
  45. {
  46. return ((PVOID) m_mlszMDData.QueryStr(bUnicode));
  47. };
  48. virtual DWORD GetDataLen(BOOL bUnicode = FALSE)
  49. {
  50. return (m_mlszMDData.QueryCB(bUnicode));
  51. };
  52. virtual DWORD GetDataType()
  53. {
  54. return(MULTISZ_METADATA);
  55. };
  56. virtual BOOL IsValid()
  57. {
  58. return m_mlszMDData.IsValid();
  59. };
  60. private:
  61. MLSZAU m_mlszMDData;
  62. };
  63. #endif