home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / objsafe.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  8KB  |  264 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 Thu Sep 11 10:59:23 1997
  6.  */
  7. /* Compiler settings for objsafe.idl:
  8.     Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, 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 __objsafe_h__
  32. #define __objsafe_h__
  33.  
  34. #ifdef __cplusplus
  35. extern "C"{
  36. #endif 
  37.  
  38. /* Forward Declarations */ 
  39.  
  40. #ifndef __IObjectSafety_FWD_DEFINED__
  41. #define __IObjectSafety_FWD_DEFINED__
  42. typedef interface IObjectSafety IObjectSafety;
  43. #endif     /* __IObjectSafety_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. /****************************************
  53.  * Generated header for interface: __MIDL_itf_objsafe_0000
  54.  * at Thu Sep 11 10:59:23 1997
  55.  * using MIDL 3.03.0110
  56.  ****************************************/
  57. /* [local] */ 
  58.  
  59.  
  60. //=--------------------------------------------------------------------------=
  61. // ObjSafe.h
  62. //=--------------------------------------------------------------------------=
  63. // (C) Copyright 1995 - 1998 Microsoft Corporation.  All Rights Reserved.
  64. //
  65. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  66. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  67. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  68. // PARTICULAR PURPOSE.
  69. //=--------------------------------------------------------------------------=
  70.  
  71. #pragma comment(lib,"uuid.lib")
  72.  
  73. //---------------------------------------------------------------------------=
  74. // Object Safety Interfaces.
  75.  
  76. //+--------------------------------------------------------------------------=
  77. //
  78. //  Contents:   IObjectSafety definition
  79. //
  80. //
  81. //  IObjectSafety should be implemented by objects that have interfaces which
  82. //      support "untrusted" clients (for example, scripts). It allows the owner of
  83. //      the object to specify which interfaces need to be protected from untrusted
  84. //      use. Examples of interfaces that might be protected in this way are:
  85. //
  86. //      IID_IDispatch           - "Safe for automating with untrusted automation client or script"
  87. //      IID_IPersist*           - "Safe for initializing with untrusted data"
  88. //      IID_IActiveScript       - "Safe for running untrusted scripts"
  89. //
  90. //---------------------------------------------------------------------------=
  91. #ifndef _LPSAFEOBJECT_DEFINED
  92. #define _LPSAFEOBJECT_DEFINED
  93.  
  94. // Option bit definitions for IObjectSafety:
  95. #define    INTERFACESAFE_FOR_UNTRUSTED_CALLER    0x00000001    // Caller of interface may be untrusted
  96. #define    INTERFACESAFE_FOR_UNTRUSTED_DATA    0x00000002    // Data passed into interface may be untrusted
  97. #define    INTERFACE_USES_DISPEX                0x00000004    // Object knows to use IDispatchEx
  98. #define    INTERFACE_USES_SECURITY_MANAGER        0x00000008    // Object knows to use IInternetHostSecurityManager
  99.  
  100. // {CB5BDC81-93C1-11cf-8F20-00805F2CD064}
  101. DEFINE_GUID(IID_IObjectSafety, 0xcb5bdc81, 0x93c1, 0x11cf, 0x8f, 0x20, 0x0, 0x80, 0x5f, 0x2c, 0xd0, 0x64);
  102. EXTERN_C GUID CATID_SafeForScripting;
  103. EXTERN_C GUID CATID_SafeForInitializing;
  104.  
  105.  
  106.  
  107. extern RPC_IF_HANDLE __MIDL_itf_objsafe_0000_v0_0_c_ifspec;
  108. extern RPC_IF_HANDLE __MIDL_itf_objsafe_0000_v0_0_s_ifspec;
  109.  
  110. #ifndef __IObjectSafety_INTERFACE_DEFINED__
  111. #define __IObjectSafety_INTERFACE_DEFINED__
  112.  
  113. /****************************************
  114.  * Generated header for interface: IObjectSafety
  115.  * at Thu Sep 11 10:59:23 1997
  116.  * using MIDL 3.03.0110
  117.  ****************************************/
  118. /* [unique][uuid][object] */ 
  119.  
  120.  
  121.  
  122. EXTERN_C const IID IID_IObjectSafety;
  123.  
  124. #if defined(__cplusplus) && !defined(CINTERFACE)
  125.     
  126.     MIDL_INTERFACE("CB5BDC81-93C1-11cf-8F20-00805F2CD064")
  127.     IObjectSafety : public IUnknown
  128.     {
  129.     public:
  130.         virtual HRESULT STDMETHODCALLTYPE GetInterfaceSafetyOptions( 
  131.             /* [in] */ REFIID riid,
  132.             /* [out] */ DWORD __RPC_FAR *pdwSupportedOptions,
  133.             /* [out] */ DWORD __RPC_FAR *pdwEnabledOptions) = 0;
  134.         
  135.         virtual HRESULT STDMETHODCALLTYPE SetInterfaceSafetyOptions( 
  136.             /* [in] */ REFIID riid,
  137.             /* [in] */ DWORD dwOptionSetMask,
  138.             /* [in] */ DWORD dwEnabledOptions) = 0;
  139.         
  140.     };
  141.     
  142. #else     /* C style interface */
  143.  
  144.     typedef struct IObjectSafetyVtbl
  145.     {
  146.         BEGIN_INTERFACE
  147.         
  148.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( 
  149.             IObjectSafety __RPC_FAR * This,
  150.             /* [in] */ REFIID riid,
  151.             /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject);
  152.         
  153.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( 
  154.             IObjectSafety __RPC_FAR * This);
  155.         
  156.         ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( 
  157.             IObjectSafety __RPC_FAR * This);
  158.         
  159.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetInterfaceSafetyOptions )( 
  160.             IObjectSafety __RPC_FAR * This,
  161.             /* [in] */ REFIID riid,
  162.             /* [out] */ DWORD __RPC_FAR *pdwSupportedOptions,
  163.             /* [out] */ DWORD __RPC_FAR *pdwEnabledOptions);
  164.         
  165.         HRESULT ( STDMETHODCALLTYPE __RPC_FAR *SetInterfaceSafetyOptions )( 
  166.             IObjectSafety __RPC_FAR * This,
  167.             /* [in] */ REFIID riid,
  168.             /* [in] */ DWORD dwOptionSetMask,
  169.             /* [in] */ DWORD dwEnabledOptions);
  170.         
  171.         END_INTERFACE
  172.     } IObjectSafetyVtbl;
  173.  
  174.     interface IObjectSafety
  175.     {
  176.         CONST_VTBL struct IObjectSafetyVtbl __RPC_FAR *lpVtbl;
  177.     };
  178.  
  179.     
  180.  
  181. #ifdef COBJMACROS
  182.  
  183.  
  184. #define IObjectSafety_QueryInterface(This,riid,ppvObject)    \
  185.     (This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
  186.  
  187. #define IObjectSafety_AddRef(This)    \
  188.     (This)->lpVtbl -> AddRef(This)
  189.  
  190. #define IObjectSafety_Release(This)    \
  191.     (This)->lpVtbl -> Release(This)
  192.  
  193.  
  194. #define IObjectSafety_GetInterfaceSafetyOptions(This,riid,pdwSupportedOptions,pdwEnabledOptions)    \
  195.     (This)->lpVtbl -> GetInterfaceSafetyOptions(This,riid,pdwSupportedOptions,pdwEnabledOptions)
  196.  
  197. #define IObjectSafety_SetInterfaceSafetyOptions(This,riid,dwOptionSetMask,dwEnabledOptions)    \
  198.     (This)->lpVtbl -> SetInterfaceSafetyOptions(This,riid,dwOptionSetMask,dwEnabledOptions)
  199.  
  200. #endif /* COBJMACROS */
  201.  
  202.  
  203. #endif     /* C style interface */
  204.  
  205.  
  206.  
  207. HRESULT STDMETHODCALLTYPE IObjectSafety_GetInterfaceSafetyOptions_Proxy( 
  208.     IObjectSafety __RPC_FAR * This,
  209.     /* [in] */ REFIID riid,
  210.     /* [out] */ DWORD __RPC_FAR *pdwSupportedOptions,
  211.     /* [out] */ DWORD __RPC_FAR *pdwEnabledOptions);
  212.  
  213.  
  214. void __RPC_STUB IObjectSafety_GetInterfaceSafetyOptions_Stub(
  215.     IRpcStubBuffer *This,
  216.     IRpcChannelBuffer *_pRpcChannelBuffer,
  217.     PRPC_MESSAGE _pRpcMessage,
  218.     DWORD *_pdwStubPhase);
  219.  
  220.  
  221. HRESULT STDMETHODCALLTYPE IObjectSafety_SetInterfaceSafetyOptions_Proxy( 
  222.     IObjectSafety __RPC_FAR * This,
  223.     /* [in] */ REFIID riid,
  224.     /* [in] */ DWORD dwOptionSetMask,
  225.     /* [in] */ DWORD dwEnabledOptions);
  226.  
  227.  
  228. void __RPC_STUB IObjectSafety_SetInterfaceSafetyOptions_Stub(
  229.     IRpcStubBuffer *This,
  230.     IRpcChannelBuffer *_pRpcChannelBuffer,
  231.     PRPC_MESSAGE _pRpcMessage,
  232.     DWORD *_pdwStubPhase);
  233.  
  234.  
  235.  
  236. #endif     /* __IObjectSafety_INTERFACE_DEFINED__ */
  237.  
  238.  
  239. /****************************************
  240.  * Generated header for interface: __MIDL_itf_objsafe_0006
  241.  * at Thu Sep 11 10:59:23 1997
  242.  * using MIDL 3.03.0110
  243.  ****************************************/
  244. /* [local] */ 
  245.  
  246.  
  247. typedef /* [unique] */ IObjectSafety __RPC_FAR *LPOBJECTSAFETY;
  248.  
  249. #endif
  250.  
  251.  
  252. extern RPC_IF_HANDLE __MIDL_itf_objsafe_0006_v0_0_c_ifspec;
  253. extern RPC_IF_HANDLE __MIDL_itf_objsafe_0006_v0_0_s_ifspec;
  254.  
  255. /* Additional Prototypes for ALL interfaces */
  256.  
  257. /* end of Additional Prototypes */
  258.  
  259. #ifdef __cplusplus
  260. }
  261. #endif
  262.  
  263. #endif
  264.