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.

76 lines
2.0 KiB

  1. // IHanjaInfo.h : Declaration of the CHanjaInfo
  2. #ifndef __HANJAINFO_H_
  3. #define __HANJAINFO_H_
  4. #include "resource.h" // main symbols
  5. /////////////////////////////////////////////////////////////////////////////
  6. // CHanjaInfo
  7. class ATL_NO_VTABLE CHanjaInfo :
  8. public CComObjectRootEx<CComSingleThreadModel>,
  9. public CComCoClass<CHanjaInfo, &CLSID_HanjaInfo>,
  10. public IDispatchImpl<IHanjaInfo, &IID_IHanjaInfo, &LIBID_HJDICTLib>
  11. {
  12. public:
  13. CHanjaInfo()
  14. {
  15. m_nBusuID = -1;
  16. m_nStroke = -1;
  17. m_nStrokeExcludeBusu = -1;
  18. m_nType = HANJA_UNKNOWN;
  19. m_bstrMeaning.Empty();
  20. m_bstrExplain.Empty();
  21. m_wchNextBusu = NULL;
  22. m_wchNextStroke = NULL;
  23. }
  24. DECLARE_REGISTRY_RESOURCEID(IDR_HANJAINFO)
  25. DECLARE_PROTECT_FINAL_CONSTRUCT()
  26. BEGIN_COM_MAP(CHanjaInfo)
  27. COM_INTERFACE_ENTRY(IHanjaInfo)
  28. COM_INTERFACE_ENTRY(IDispatch)
  29. END_COM_MAP()
  30. // Operator
  31. public:
  32. void Initialize(short BusuID, short Stroke, short StrokeExcludeBusu, short Type,
  33. LPCWSTR lpcwszMean, LPCWSTR lpcwszExplain,
  34. WCHAR wchNextBusu, WCHAR wchNextStroke)
  35. {
  36. m_nBusuID = BusuID;
  37. m_nStroke = Stroke;
  38. m_nStrokeExcludeBusu = StrokeExcludeBusu;
  39. m_nType = (HANJA_TYPE)Type;
  40. m_bstrMeaning = lpcwszMean;
  41. m_bstrExplain = lpcwszExplain;
  42. m_wchNextBusu = wchNextBusu;
  43. m_wchNextStroke = wchNextStroke;
  44. }
  45. // IHanjaInfo
  46. public:
  47. STDMETHOD(get_NextStroke)(/*[out, retval]*/ long *pVal);
  48. STDMETHOD(get_NextBusu)(/*[out, retval]*/ long *pVal);
  49. STDMETHOD(get_Explain)(/*[out, retval]*/ BSTR *pVal);
  50. STDMETHOD(get_Meaning)(/*[out, retval]*/ BSTR *pVal);
  51. STDMETHOD(get_Type)(/*[out, retval]*/ HANJA_TYPE *pVal);
  52. STDMETHOD(get_StrokeExcludeBusu)(/*[out, retval]*/ short *pVal);
  53. STDMETHOD(get_Stroke)(/*[out, retval]*/ short *pVal);
  54. STDMETHOD(get_BusuID)(/*[out, retval]*/ short *pVal);
  55. // Data members
  56. protected:
  57. short m_nBusuID;
  58. short m_nStroke;
  59. short m_nStrokeExcludeBusu;
  60. HANJA_TYPE m_nType;
  61. CComBSTR m_bstrMeaning;
  62. CComBSTR m_bstrExplain;
  63. WCHAR m_wchNextBusu;
  64. WCHAR m_wchNextStroke;
  65. };
  66. #endif //__HANJAINFO_H_