home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / oleview / iviewers / iviewers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  1.9 KB  |  62 lines

  1. // iviewers.h
  2. //
  3. // Definitions for Ole2View 2.0's interface viewers
  4. //
  5.  
  6. // This is a part of the Microsoft Foundation Classes C++ library.
  7. // Copyright (C) 1992-1998 Microsoft Corporation
  8. // All rights reserved.
  9. //
  10. // This source code is only intended as a supplement to the
  11. // Microsoft Foundation Classes Reference and related
  12. // electronic documentation provided with the library.
  13. // See these sources for detailed information regarding the
  14. // Microsoft Foundation Classes product.
  15.  
  16. #ifndef __IVIEWERS_H__
  17. #define __IVIEWERS_H__
  18.  
  19. DEFINE_GUID(IID_IInterfaceViewer, /* fc37e5ba-4a8e-11ce-870b-0800368d2302 */
  20.     0xfc37e5ba,
  21.     0x4a8e,
  22.     0x11ce,
  23.     0x87, 0x0b, 0x08, 0x00, 0x36, 0x8d, 0x23, 0x02
  24.   );
  25.  
  26. #ifndef __IInterfaceViewer__
  27. #define __IInterfaceViewer__
  28. DECLARE_INTERFACE_(IInterfaceViewer, IUnknown)
  29. {
  30.     // *** IUnknown methods ***
  31.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  32.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  33.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  34.  
  35.     // *** IInterfaceViewer methods ***
  36.     STDMETHOD(View) (HWND hwndParent, REFIID riid, LPUNKNOWN punk) PURE;
  37. };
  38. #endif // __IInterfaceViewer__
  39.  
  40.  
  41. // IInterfaceViewer::View can return the following SCODEs
  42. //
  43. // S_OK
  44. // E_INVALIDARG
  45. // E_UNEXPECTED
  46. // E_OUTOFMEMORY
  47. //
  48.  
  49. // CLSIDs of viewers implemented in IVIEWER.DLL
  50. //
  51. DEFINE_GUID(CLSID_ITypeLibViewer,    0x57efbf49, 0x4a8b, 0x11ce, 0x87, 0xb,  0x8,  0x0,  0x36, 0x8d, 0x23, 0x2 ) ;
  52. DEFINE_GUID(CLSID_IDataObjectViewer, 0x28d8aba0, 0x4b78, 0x11ce, 0xb2, 0x7d, 0x0,  0xaa, 0x0,  0x1f, 0x73, 0xc1);
  53. DEFINE_GUID(CLSID_IDispatchViewer,   0xd2af7a60, 0x4c42, 0x11ce, 0xb2, 0x7d, 0x00, 0xaa, 0x00, 0x1f, 0x73, 0xc1) ;
  54.  
  55. // Helper function exported from iviewers.dll.  Make sure OLE is initialized
  56. // before calling.   rclsid is the clsid of the interface viewer and riid
  57. // is the iid of the interface.
  58. //
  59. STDAPI DllRegisterInterfaceViewer( REFCLSID rclsid, REFIID riid );
  60.  
  61. #endif // __IVIEWERS_H__
  62.