home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / oleaut / browseh / mydisp.odl < prev    next >
Encoding:
Text File  |  1997-09-30  |  1.9 KB  |  73 lines

  1. [
  2.   uuid(8C0D9B00-4669-101B-B826-00DD01103DE1),
  3.   version(1.0)
  4. library MyDispatchLibrary
  5. {
  6. #ifdef WIN32
  7.     importlib("stdole2.tlb");
  8. #else
  9.     importlib("stdole.tlb");
  10.     typedef [public] void *LPTYPEINFO;  
  11.     typedef [public] long MEMBERID;   
  12.     
  13.     typedef  enum {
  14.       TKIND_ENUM = 0
  15.     , TKIND_RECORD
  16.     , TKIND_MODULE
  17.     , TKIND_INTERFACE
  18.     , TKIND_DISPATCH
  19.     , TKIND_COCLASS
  20.     , TKIND_ALIAS
  21.     , TKIND_UNION
  22.     , TKIND_MAX         /* end of enum marker */
  23.     } TYPEKIND;    
  24.     
  25.     typedef enum tagCALLCONV {
  26.       CC_CDECL = 1
  27.     , CC_MSCPASCAL
  28.     , CC_PASCAL = 2
  29.     , CC_MACPASCAL
  30.     , CC_STDCALL
  31.     , CC_RESERVED
  32.     , CC_SYSCALL
  33.     , CC_MPWCDECL
  34.     , CC_MPWPASCAL
  35.     , CC_MAX            /* end of enum marker */
  36.     } CALLCONV;
  37.     
  38.     typedef enum tagFUNCKIND {
  39.       FUNC_VIRTUAL
  40.     , FUNC_PUREVIRTUAL
  41.     , FUNC_NONVIRTUAL
  42.     , FUNC_STATIC
  43.     , FUNC_DISPATCH
  44.     } FUNCKIND;  
  45.     
  46.     typedef enum tagINVOKEKIND {
  47.       INVOKE_FUNC = 0x01
  48.     , INVOKE_PROPERTYGET = 0x02
  49.     , INVOKE_PROPERTYPUT = 0x04
  50.     , INVOKE_PROPERTYPUTREF =0x08
  51.     } INVOKEKIND;
  52. #endif
  53.     
  54.     [
  55.       uuid(8C0D9B01-4669-101B-B826-00DD01103DE1), 
  56.       helpstring("Common Dispatch Interface"),
  57.       dual
  58.     ]
  59.     interface CMyDispatch : IDispatch
  60.     {
  61.         void _CMyDispatchDestructor();   // Dummy place holder for the virtual destructor of CMyDispatch
  62.        // The function signatures below are different from the
  63.        // the actual function signatures used in mydisp.h. This does'nt
  64.        // matter because these are merely place holders so that that vtable 
  65.        // offsets of the member functions of classes that derive from CMyDispatch  
  66.        // are correct.
  67.         void _LoadTypeInfo();         
  68.         void _RaiseException();
  69.         void _GetInterfaceID();           
  70.     } 
  71. }  
  72.