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.

57 lines
1.6 KiB

  1. /*++
  2. Copyright (C) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. MOFOUT.H
  5. Abstract:
  6. Class and code used to output split files.
  7. History:
  8. 2/4/99 a-davj Compiles.
  9. --*/
  10. #ifndef _MOFOUT_H_
  11. #define _MOFOUT_H_
  12. #include <windows.h>
  13. #include <wbemidl.h>
  14. #include <miniafx.h>
  15. typedef enum {NEUTRAL, LOCALIZED} OutputType;
  16. class COutput
  17. {
  18. HANDLE m_hFile; // file being output to
  19. OutputType m_Type; // indicates neutral/localized
  20. BOOL m_bUnicode; // true if unicode
  21. int m_Level; // 0 indicates normal object, higher numbers
  22. // indicate that current object is embedded
  23. long m_lClassFlags; // last class flags
  24. long m_lInstanceFlags; // last instance flags
  25. WCHAR m_wszNamespace[MAX_PATH+1]; // last namespace
  26. bool m_bSplitting; // indicates if current instance has a "locale" qual.
  27. long m_lLocale;
  28. public:
  29. COutput(TCHAR * pName, OutputType ot, BOOL bUnicode, BOOL bAutoRecovery, long lLocale);
  30. ~COutput();
  31. void WritePragmasForAnyChanges(long lClassFlags, long lInstanceFlags,
  32. LPWSTR pwsNamespace, long lLocale);
  33. void IncLevel(){m_Level++;};
  34. void DecLevel(){m_Level--;};
  35. int GetLevel(){return m_Level;};
  36. long GetLocale(){return m_lLocale;};
  37. bool IsSplitting(){return m_bSplitting;};
  38. void SetSplitting(bool bVal){m_bSplitting = bVal;};
  39. BOOL IsOK(){return (m_hFile != INVALID_HANDLE_VALUE);};
  40. OutputType GetType(){return m_Type;};
  41. bool WriteLPWSTR(WCHAR const * pOutput);
  42. bool WriteVARIANT(VARIANT & var);
  43. bool NewLine(int iIndent);
  44. };
  45. #endif