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.

84 lines
3.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright 1996-1998 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // Contents: Object Safety Interfaces (should come from ObjSafe.idl)
  6. //
  7. //----------------------------------------------------------------------------
  8. cpp_quote("//=--------------------------------------------------------------------------=")
  9. cpp_quote("// ObjSafe.h")
  10. cpp_quote("//=--------------------------------------------------------------------------=")
  11. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.")
  12. cpp_quote("//")
  13. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
  14. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  15. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  16. cpp_quote("// PARTICULAR PURPOSE.")
  17. cpp_quote("//=--------------------------------------------------------------------------=")
  18. cpp_quote("")
  19. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  20. cpp_quote("")
  21. cpp_quote("//---------------------------------------------------------------------------=")
  22. cpp_quote("// Object Safety Interfaces.")
  23. cpp_quote("")
  24. #ifndef DO_NO_IMPORTS
  25. import "unknwn.idl";
  26. #endif
  27. cpp_quote("//+--------------------------------------------------------------------------=")
  28. cpp_quote("//")
  29. cpp_quote("// Contents: IObjectSafety definition")
  30. cpp_quote("//")
  31. cpp_quote("//")
  32. cpp_quote("// IObjectSafety should be implemented by objects that have interfaces which")
  33. cpp_quote("// support \"untrusted\" clients (for example, scripts). It allows the owner of")
  34. cpp_quote("// the object to specify which interfaces need to be protected from untrusted")
  35. cpp_quote("// use. Examples of interfaces that might be protected in this way are:")
  36. cpp_quote("//")
  37. cpp_quote("// IID_IDispatch - \"Safe for automating with untrusted automation client or script\"")
  38. cpp_quote("// IID_IPersist* - \"Safe for initializing with untrusted data\"")
  39. cpp_quote("// IID_IActiveScript - \"Safe for running untrusted scripts\"")
  40. cpp_quote("//")
  41. cpp_quote("//---------------------------------------------------------------------------=")
  42. cpp_quote("#ifndef _LPSAFEOBJECT_DEFINED")
  43. cpp_quote("#define _LPSAFEOBJECT_DEFINED")
  44. cpp_quote("")
  45. cpp_quote("// Option bit definitions for IObjectSafety:")
  46. cpp_quote("#define INTERFACESAFE_FOR_UNTRUSTED_CALLER 0x00000001 // Caller of interface may be untrusted")
  47. cpp_quote("#define INTERFACESAFE_FOR_UNTRUSTED_DATA 0x00000002 // Data passed into interface may be untrusted")
  48. cpp_quote("#define INTERFACE_USES_DISPEX 0x00000004 // Object knows to use IDispatchEx")
  49. cpp_quote("#define INTERFACE_USES_SECURITY_MANAGER 0x00000008 // Object knows to use IInternetHostSecurityManager")
  50. cpp_quote("")
  51. cpp_quote("// {CB5BDC81-93C1-11cf-8F20-00805F2CD064}")
  52. cpp_quote("DEFINE_GUID(IID_IObjectSafety, 0xcb5bdc81, 0x93c1, 0x11cf, 0x8f, 0x20, 0x0, 0x80, 0x5f, 0x2c, 0xd0, 0x64);")
  53. cpp_quote("EXTERN_C GUID CATID_SafeForScripting;")
  54. cpp_quote("EXTERN_C GUID CATID_SafeForInitializing;")
  55. cpp_quote("")
  56. [
  57. object,
  58. uuid(CB5BDC81-93C1-11cf-8F20-00805F2CD064),
  59. pointer_default(unique)
  60. ]
  61. interface IObjectSafety : IUnknown
  62. {
  63. HRESULT GetInterfaceSafetyOptions(
  64. [in] REFIID riid, // Interface that we want options for
  65. [out] DWORD * pdwSupportedOptions, // Options meaningful on this interface
  66. [out] DWORD * pdwEnabledOptions); // current option values on this interface
  67. HRESULT SetInterfaceSafetyOptions(
  68. [in] REFIID riid, // Interface to set options for
  69. [in] DWORD dwOptionSetMask, // Options to change
  70. [in] DWORD dwEnabledOptions); // New option values
  71. }
  72. typedef [unique] IObjectSafety *LPOBJECTSAFETY;
  73. cpp_quote("#endif")