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.

54 lines
1.5 KiB

  1. #ifndef _CONVOBJ_H_
  2. #define _CONVOBJ_H_
  3. #ifdef __cplusplus
  4. #include "mlatl.h"
  5. #include "fechrcnv.h"
  6. #include "convbase.h"
  7. #include "ichrcnv.h"
  8. //
  9. // CMLangConvertCharset declaration with IMLangConvertCharset Interface
  10. //
  11. class ATL_NO_VTABLE CMLangConvertCharset :
  12. public CComObjectRoot,
  13. public CComCoClass<CMLangConvertCharset, &CLSID_CMLangConvertCharset>,
  14. public IMLangConvertCharset
  15. {
  16. public:
  17. CMLangConvertCharset(void);
  18. ~CMLangConvertCharset(void);
  19. DECLARE_NO_REGISTRY()
  20. BEGIN_COM_MAP(CMLangConvertCharset)
  21. COM_INTERFACE_ENTRY(IMLangConvertCharset)
  22. END_COM_MAP()
  23. public:
  24. // IMLangConvertCharset
  25. STDMETHOD(Initialize)(UINT uiSrcCodePage, UINT uiDstCodePage, DWORD dwProperty);
  26. STDMETHOD(GetSourceCodePage)(UINT *puiSrcCodePage);
  27. STDMETHOD(GetDestinationCodePage)(UINT *puiDstCodePage);
  28. STDMETHOD(GetDeterminedSrcCodePage)(UINT *puiCodePage);
  29. STDMETHOD(GetProperty)(DWORD *pdwProperty);
  30. STDMETHOD(DoConversion)(BYTE *pSrcStr, UINT *pcSrcSize, BYTE *pDstStr, UINT *pcDstSize);
  31. STDMETHOD(DoConversionToUnicode)(CHAR *pSrcStr, UINT *pcSrcSize, WCHAR *pDstStr, UINT *pcDstSize);
  32. STDMETHOD(DoConversionFromUnicode)(WCHAR *pSrcStr, UINT *pcSrcSize, CHAR *pDstStr, UINT *pcDstSize);
  33. private:
  34. DWORD m_dwSrcEncoding;
  35. DWORD m_dwDetectSrcEncoding;
  36. DWORD m_dwDstEncoding;
  37. DWORD m_dwMode;
  38. DWORD m_dwProperty;
  39. CICharConverter* lpCharConverter;
  40. };
  41. #endif // __cplusplus
  42. #endif // _CONVOBJ_H_