home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / chap06 / ianimal / ianimal.h < prev    next >
C/C++ Source or Header  |  1998-03-30  |  6KB  |  228 lines

  1. /* this ALWAYS GENERATED file contains the definitions for the interfaces */
  2.  
  3.  
  4. /* File created by MIDL compiler version 3.03.0110 */
  5. /* at Mon Mar 30 03:48:14 1998
  6.  */
  7. /* Compiler settings for ianimal.idl:
  8.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, app_config, c_ext
  9.     error checks: none
  10. */
  11. //@@MIDL_FILE_HEADING(  )
  12.  
  13.  
  14. /* verify that the <rpcndr.h> version is high enough to compile this file*/
  15. #ifndef __REQUIRED_RPCNDR_H_VERSION__
  16. #define __REQUIRED_RPCNDR_H_VERSION__ 440
  17. #endif
  18.  
  19. #include "rpc.h"
  20. #include "rpcndr.h"
  21.  
  22. #ifndef __RPCNDR_H_VERSION__
  23. #error this stub requires an updated version of <rpcndr.h>
  24. #endif // __RPCNDR_H_VERSION__
  25.  
  26. #ifndef COM_NO_WINDOWS_H
  27. #include "windows.h"
  28. #include "ole2.h"
  29. #endif /*COM_NO_WINDOWS_H*/
  30.  
  31. #ifndef __ianimal_h__
  32. #define __ianimal_h__
  33.  
  34. #ifdef __cplusplus
  35. extern "C"{
  36. #endif 
  37.  
  38. /* Forward Declarations */ 
  39.  
  40. #ifndef __IAnimal_FWD_DEFINED__
  41. #define __IAnimal_FWD_DEFINED__
  42. typedef interface IAnimal IAnimal;
  43. #endif     /* __IAnimal_FWD_DEFINED__ */
  44.  
  45.  
  46. /* header files for imported files */
  47. #include "unknwn.h"
  48.  
  49. void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
  50. void __RPC_USER MIDL_user_free( void __RPC_FAR * ); 
  51.  
  52. #ifndef __IAnimal_INTERFACE_DEFINED__
  53. #define __IAnimal_INTERFACE_DEFINED__
  54.  
  55. /****************************************
  56.  * Generated header for interface: IAnimal
  57.  * at Mon Mar 30 03:48:14 1998
  58.  * using MIDL 3.03.0110
  59.  ****************************************/
  60. /* [object][uuid] */ 
  61.  
  62.  
  63.  
  64. EXTERN_C const IID IID_IAnimal;
  65.  
  66. #if defined(__cplusplus) && !defined(CINTERFACE)
  67.     
  68.     MIDL_INTERFACE("0002114a-0000-0000-c000-000000000046")
  69.     IAnimal : public IUnknown
  70.     {
  71.     public:
  72.         virtual HRESULT STDMETHODCALLTYPE Eat( 
  73.             /* [in] */ LPTSTR pszFoodRecommended,
  74.             /* [out][in] */ LPTSTR pszFoodEaten,
  75.             /* [in] */ short cchEaten) = 0;
  76.         
  77.         virtual HRESULT STDMETHODCALLTYPE Sleep( 
  78.             /* [out][in] */ short __RPC_FAR *pcMinutes) = 0;
  79.         
  80.         virtual HRESULT STDMETHODCALLTYPE Procreate( 
  81.             /* [out] */ short __RPC_FAR *pcOffspring) = 0;
  82.         
  83.         virtual HRESULT STDMETHODCALLTYPE WhatKindOfAnimal( 
  84.             /* [out] */ IID __RPC_FAR *pIID) = 0;
  85.         
  86.     };
  87.     
  88. #else     /* C style interface */
  89.  
  90.     typedef struct IAnimalVtbl
  91.     {
  92.         BEGIN_INTERFACE
  93.         
  94.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
  95.             IAnimal __RPC_FAR * This,
  96.             /* [in] */ REFIID riid,
  97.             /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
  98.         
  99.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
  100.             IAnimal __RPC_FAR * This);
  101.         
  102.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
  103.             IAnimal __RPC_FAR * This);
  104.         
  105.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Eat )( 
  106.             IAnimal __RPC_FAR * This,
  107.             /* [in] */ LPTSTR pszFoodRecommended,
  108.             /* [out][in] */ LPTSTR pszFoodEaten,
  109.             /* [in] */ short cchEaten);
  110.         
  111.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Sleep )( 
  112.             IAnimal __RPC_FAR * This,
  113.             /* [out][in] */ short __RPC_FAR *pcMinutes);
  114.         
  115.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *Procreate )( 
  116.             IAnimal __RPC_FAR * This,
  117.             /* [out] */ short __RPC_FAR *pcOffspring);
  118.         
  119.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *WhatKindOfAnimal )( 
  120.             IAnimal __RPC_FAR * This,
  121.             /* [out] */ IID __RPC_FAR *pIID);
  122.         
  123.         END_INTERFACE
  124.     } IAnimalVtbl;
  125.  
  126.     interface IAnimal
  127.     {
  128.         CONST_VTBL struct IAnimalVtbl __RPC_FAR *lpVtbl;
  129.     };
  130.  
  131.     
  132.  
  133. #ifdef COBJMACROS
  134.  
  135.  
  136. #define IAnimal_QueryInterface(This,riid,ppvObject)    \
  137.     (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  138.  
  139. #define IAnimal_AddRef(This)    \
  140.     (This)->lpVtbl -> AddRef(This)
  141.  
  142. #define IAnimal_Release(This)    \
  143.     (This)->lpVtbl -> Release(This)
  144.  
  145.  
  146. #define IAnimal_Eat(This,pszFoodRecommended,pszFoodEaten,cchEaten)    \
  147.     (This)->lpVtbl -> Eat(This,pszFoodRecommended,pszFoodEaten,cchEaten)
  148.  
  149. #define IAnimal_Sleep(This,pcMinutes)    \
  150.     (This)->lpVtbl -> Sleep(This,pcMinutes)
  151.  
  152. #define IAnimal_Procreate(This,pcOffspring)    \
  153.     (This)->lpVtbl -> Procreate(This,pcOffspring)
  154.  
  155. #define IAnimal_WhatKindOfAnimal(This,pIID)    \
  156.     (This)->lpVtbl -> WhatKindOfAnimal(This,pIID)
  157.  
  158. #endif /* COBJMACROS */
  159.  
  160.  
  161. #endif     /* C style interface */
  162.  
  163.  
  164.  
  165. HRESULT STDMETHODCALLTYPE IAnimal_Eat_Proxy( 
  166.     IAnimal __RPC_FAR * This,
  167.     /* [in] */ LPTSTR pszFoodRecommended,
  168.     /* [out][in] */ LPTSTR pszFoodEaten,
  169.     /* [in] */ short cchEaten);
  170.  
  171.  
  172. void __RPC_STUB IAnimal_Eat_Stub(
  173.     IRpcStubBuffer *This,
  174.     IRpcChannelBuffer *_pRpcChannelBuffer,
  175.     PRPC_MESSAGE _pRpcMessage,
  176.     DWORD *_pdwStubPhase);
  177.  
  178.  
  179. HRESULT STDMETHODCALLTYPE IAnimal_Sleep_Proxy( 
  180.     IAnimal __RPC_FAR * This,
  181.     /* [out][in] */ short __RPC_FAR *pcMinutes);
  182.  
  183.  
  184. void __RPC_STUB IAnimal_Sleep_Stub(
  185.     IRpcStubBuffer *This,
  186.     IRpcChannelBuffer *_pRpcChannelBuffer,
  187.     PRPC_MESSAGE _pRpcMessage,
  188.     DWORD *_pdwStubPhase);
  189.  
  190.  
  191. HRESULT STDMETHODCALLTYPE IAnimal_Procreate_Proxy( 
  192.     IAnimal __RPC_FAR * This,
  193.     /* [out] */ short __RPC_FAR *pcOffspring);
  194.  
  195.  
  196. void __RPC_STUB IAnimal_Procreate_Stub(
  197.     IRpcStubBuffer *This,
  198.     IRpcChannelBuffer *_pRpcChannelBuffer,
  199.     PRPC_MESSAGE _pRpcMessage,
  200.     DWORD *_pdwStubPhase);
  201.  
  202.  
  203. HRESULT STDMETHODCALLTYPE IAnimal_WhatKindOfAnimal_Proxy( 
  204.     IAnimal __RPC_FAR * This,
  205.     /* [out] */ IID __RPC_FAR *pIID);
  206.  
  207.  
  208. void __RPC_STUB IAnimal_WhatKindOfAnimal_Stub(
  209.     IRpcStubBuffer *This,
  210.     IRpcChannelBuffer *_pRpcChannelBuffer,
  211.     PRPC_MESSAGE _pRpcMessage,
  212.     DWORD *_pdwStubPhase);
  213.  
  214.  
  215.  
  216. #endif     /* __IAnimal_INTERFACE_DEFINED__ */
  217.  
  218.  
  219. /* Additional Prototypes for ALL interfaces */
  220.  
  221. /* end of Additional Prototypes */
  222.  
  223. #ifdef __cplusplus
  224. }
  225. #endif
  226.  
  227. #endif
  228.