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.

94 lines
1.8 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 _strdata_
  14. #define _strdata_
  15. class CMDSTRData : public CMDBaseData
  16. {
  17. public:
  18. CMDSTRData(
  19. DWORD dwMDIdentifier,
  20. DWORD dwMDAttributes,
  21. DWORD dwMDUserType,
  22. LPSTR strMDData,
  23. BOOL bUnicode)
  24. /*++
  25. Routine Description:
  26. Constructor for a string object.
  27. Arguments:
  28. MDIdentifier - The Identifier of the data object.
  29. MDAttributes - The data object attributes.
  30. MDUserType - The data object User Type.
  31. MDData - The string data.
  32. Return Value:
  33. --*/
  34. :
  35. CMDBaseData(dwMDIdentifier, dwMDAttributes, dwMDUserType),
  36. m_strMDData (strMDData, bUnicode)
  37. {};
  38. virtual PVOID GetData(BOOL bUnicode = FALSE)
  39. {
  40. return ((PVOID) m_strMDData.QueryStr(bUnicode));
  41. };
  42. virtual DWORD GetDataLen(BOOL bUnicode = FALSE)
  43. {
  44. return (m_strMDData.QueryCB(bUnicode) + ((bUnicode) ? sizeof(WCHAR) : sizeof(CHAR)));
  45. };
  46. /*
  47. virtual DWORD SetData(
  48. DWORD dwMDAttributes,
  49. DWORD dwMDUserType,
  50. DWORD dwMDDataLen,
  51. PVOID binMDData)
  52. {
  53. m_strMDData.Copy((LPTSTR) binMDData);
  54. return(CMDBaseData::SetData(dwMDAttributes, dwMDUserType));
  55. };
  56. */
  57. virtual DWORD GetDataType()
  58. {
  59. return(STRING_METADATA);
  60. };
  61. virtual BOOL IsValid()
  62. {
  63. return m_strMDData.IsValid();
  64. };
  65. private:
  66. STRAU m_strMDData;
  67. };
  68. #endif
  69.