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.

225 lines
5.6 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. // Note: This header file contains useful classes that are documented only
  11. // in the MFC Technical Notes. These classes may change from version to
  12. // version, so be prepared to change your code accordingly if you utilize
  13. // this header. In the future, commonly used portions of this header
  14. // may be moved and officially documented.
  15. #ifndef __AFXPRIV2_H__
  16. // Do not define __AFXPRIV2_H__ here. It is defined at the bottom.
  17. #ifndef __AFXPRIV_H__
  18. #include <afxpriv.h>
  19. #endif
  20. #ifdef _AFX_MINREBUILD
  21. #pragma component(minrebuild, off)
  22. #endif
  23. #ifndef _AFX_FULLTYPEINFO
  24. #pragma component(mintypeinfo, on)
  25. #endif
  26. #ifdef _AFX_PACKING
  27. #pragma pack(push, _AFX_PACKING)
  28. #endif
  29. /////////////////////////////////////////////////////////////////////////////
  30. // AFXPRIV2 - MFC Private Classes
  31. // General OLE features
  32. #if (!defined _AFX_NO_OLE_SUPPORT) && (defined _OBJBASE_H_)
  33. // Implementation structures
  34. struct AFX_EVENT; // Event sink implementation
  35. // Classes declared in this file
  36. class COleControlLock;
  37. #endif
  38. // OLE Automation features
  39. #ifdef __AFXDISP_H__
  40. // Classes declared in this file
  41. //IStream
  42. class CArchiveStream;
  43. // Functions declared in this file
  44. // AfxBSTR2ABTSR
  45. // AfxTaskStringA2W
  46. // AfxTaskStringW2A
  47. #endif
  48. /////////////////////////////////////////////////////////////////////////////
  49. #undef AFX_DATA
  50. #define AFX_DATA AFX_CORE_DATA
  51. /////////////////////////////////////////////////////////////////////////////
  52. // General OLE features
  53. #if (!defined _AFX_NO_OLE_SUPPORT) && (defined _OBJBASE_H_)
  54. #ifndef __AFXPRIV2_H__OLE__
  55. #define __AFXPRIV2_H__OLE__
  56. /////////////////////////////////////////////////////////////////////////////
  57. // Implementation of event sink handling
  58. struct AFX_EVENT
  59. {
  60. enum
  61. {
  62. event,
  63. propRequest, propChanged,
  64. propDSCNotify
  65. };
  66. AFX_EVENT(int eventKind);
  67. AFX_EVENT(int eventKind, DISPID dispid, DISPPARAMS* pDispParams = NULL,
  68. EXCEPINFO* pExcepInfo = NULL, UINT* puArgError = NULL);
  69. int m_eventKind;
  70. DISPID m_dispid;
  71. DISPPARAMS* m_pDispParams;
  72. EXCEPINFO* m_pExcepInfo;
  73. UINT* m_puArgError;
  74. BOOL m_bPropChanged;
  75. HRESULT m_hResult;
  76. DSCSTATE m_nDSCState;
  77. DSCREASON m_nDSCReason;
  78. };
  79. AFX_INLINE AFX_EVENT::AFX_EVENT(int eventKind)
  80. {
  81. m_eventKind = eventKind;
  82. m_dispid = DISPID_UNKNOWN;
  83. m_pDispParams = NULL;
  84. m_pExcepInfo = NULL;
  85. m_puArgError = NULL;
  86. m_hResult = NOERROR;
  87. m_nDSCState = dscNoState;
  88. m_nDSCReason = dscNoReason;
  89. }
  90. AFX_INLINE AFX_EVENT::AFX_EVENT(int eventKind, DISPID dispid,
  91. DISPPARAMS* pDispParams, EXCEPINFO* pExcepInfo, UINT* puArgError)
  92. {
  93. m_eventKind = eventKind;
  94. m_dispid = dispid;
  95. m_pDispParams = pDispParams;
  96. m_pExcepInfo = pExcepInfo;
  97. m_puArgError = puArgError;
  98. m_hResult = NOERROR;
  99. m_nDSCState = dscNoState;
  100. m_nDSCReason = dscNoReason;
  101. }
  102. /////////////////////////////////////////////////////////////////////////////
  103. // COleControlLock
  104. class COleControlLock
  105. {
  106. // Constructors
  107. public:
  108. COleControlLock(REFCLSID clsid);
  109. // Attributes
  110. CLSID m_clsid;
  111. LPCLASSFACTORY m_pClassFactory;
  112. COleControlLock* m_pNextLock;
  113. // Implementation
  114. public:
  115. virtual ~COleControlLock();
  116. };
  117. #endif // __AFXPRIV2_H__OLE__
  118. #endif //(!defined _AFX_NO_OLE_SUPPORT) && (defined _OBJBASE_H_)
  119. /////////////////////////////////////////////////////////////////////////////
  120. // OLE Automation features
  121. #ifdef __AFXDISP_H__
  122. #ifndef __AFXPRIV2_H__DISP__
  123. #define __AFXPRIV2_H__DISP__
  124. /////////////////////////////////////////////////////////////////////////////
  125. // CArchiveStream
  126. class CArchiveStream : public IStream
  127. {
  128. public:
  129. CArchiveStream(CArchive* pArchive);
  130. // Implementation
  131. CArchive* m_pArchive;
  132. STDMETHOD_(ULONG, AddRef)();
  133. STDMETHOD_(ULONG, Release)();
  134. STDMETHOD(QueryInterface)(REFIID, LPVOID*);
  135. STDMETHOD(Read)(void*, ULONG, ULONG*);
  136. STDMETHOD(Write)(const void*, ULONG cb, ULONG*);
  137. STDMETHOD(Seek)(LARGE_INTEGER, DWORD, ULARGE_INTEGER*);
  138. STDMETHOD(SetSize)(ULARGE_INTEGER);
  139. STDMETHOD(CopyTo)(LPSTREAM, ULARGE_INTEGER, ULARGE_INTEGER*,
  140. ULARGE_INTEGER*);
  141. STDMETHOD(Commit)(DWORD);
  142. STDMETHOD(Revert)();
  143. STDMETHOD(LockRegion)(ULARGE_INTEGER, ULARGE_INTEGER,DWORD);
  144. STDMETHOD(UnlockRegion)(ULARGE_INTEGER, ULARGE_INTEGER, DWORD);
  145. STDMETHOD(Stat)(STATSTG*, DWORD);
  146. STDMETHOD(Clone)(LPSTREAM*);
  147. };
  148. /////////////////////////////////////////////////////////////////////////////
  149. // Global UNICODE<>ANSI translation helpers
  150. void AFXAPI AfxBSTR2CString(CString* pStr, BSTR bstr);
  151. #if !defined(_UNICODE) && !defined(OLE2ANSI)
  152. BSTR AFXAPI AfxBSTR2ABSTR(BSTR bstrW);
  153. LPWSTR AFXAPI AfxTaskStringA2W(LPCSTR lpa);
  154. LPSTR AFXAPI AfxTaskStringW2A(LPCWSTR lpw);
  155. #endif
  156. #endif // __AFXPRIV2_H__DISP__
  157. #endif // __AFXDISP_H__
  158. /////////////////////////////////////////////////////////////////////////////
  159. #ifdef _AFX_PACKING
  160. #pragma pack(pop)
  161. #endif
  162. #undef AFX_DATA
  163. #define AFX_DATA
  164. #ifdef _AFX_MINREBUILD
  165. #pragma component(minrebuild, on)
  166. #endif
  167. #ifndef _AFX_FULLTYPEINFO
  168. #pragma component(mintypeinfo, off)
  169. #endif
  170. #if (defined __AFXPRIV2_H__OLE__) && (defined __AFXPRIV2_H__DISP__)
  171. #define __AFXPRIV2_H__
  172. #endif
  173. #endif // __AFXPRIV2_H__
  174. /////////////////////////////////////////////////////////////////////////////