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.

106 lines
3.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997-1998.
  5. //
  6. // File: safeocx.idl
  7. //
  8. //----------------------------------------------------------------------------
  9. cpp_quote("//+-------------------------------------------------------------------------")
  10. cpp_quote("//")
  11. cpp_quote("// Microsoft Windows")
  12. cpp_quote("// Copyright (C) Microsoft Corporation, 1997-1998.")
  13. cpp_quote("//")
  14. cpp_quote("//--------------------------------------------------------------------------")
  15. #ifndef DO_NO_IMPORTS
  16. import "unknwn.idl";
  17. import "wtypes.idl";
  18. import "urlmon.idl";
  19. #endif
  20. cpp_quote("")
  21. cpp_quote("#pragma comment(lib,\"uuid.lib\")")
  22. cpp_quote("")
  23. cpp_quote("DEFINE_GUID(CLSID_IActiveXSafetyProvider, 0xaaf8c6ce, 0xf972, 0x11d0, 0x97, 0xeb, 0x00, 0xaa, 0x00, 0x61, 0x53, 0x33);")
  24. cpp_quote("DEFINE_GUID(IID_IActiveXSafetyProvider, 0x69ff5101, 0xfc63, 0x11d0, 0x97, 0xeb, 0x00, 0xaa, 0x00, 0x61, 0x53, 0x33);")
  25. [
  26. object,
  27. uuid(69ff5101-fc63-11d0-97eb-00aa00615333),
  28. pointer_default(unique),
  29. local
  30. ]
  31. interface IActiveXSafetyProvider : IUnknown
  32. {
  33. typedef [unique] IActiveXSafetyProvider *LPACTIVEXSAFETYPROVIDER;
  34. // Controls whether the call to SafeGetClassObject/SafeCreateInstance will
  35. // just call OLE32.DLL or whether the control will be loaded into a VM
  36. HRESULT TreatControlAsUntrusted(
  37. [in] BOOL fTreatAsTUntrusted
  38. );
  39. // Gets the current setting of TreatControlAsUntrusted
  40. HRESULT IsControlUntrusted(
  41. [out] BOOL *pfIsUntrusted
  42. );
  43. // Informs the ActiveX safety provider talk to zones
  44. HRESULT SetSecurityManager(
  45. [in] IInternetSecurityManager *pSecurityManager
  46. );
  47. // Informs the ActiveX safety provider where the document was loaded from
  48. HRESULT SetDocumentURLA(
  49. [in] LPCSTR szDocumentURL
  50. );
  51. HRESULT SetDocumentURLW(
  52. [in] LPCWSTR szDocumentURL
  53. );
  54. // Resets the all of the above settings to their defaults
  55. HRESULT ResetToDefaults(
  56. void
  57. );
  58. // Calls DllRegisterServer on the specified control, using the current
  59. // safety settings.
  60. HRESULT SafeDllRegisterServerA(
  61. [in] LPCSTR szServerName
  62. );
  63. HRESULT SafeDllRegisterServerW(
  64. [in] LPCWSTR szServerName
  65. );
  66. // Calls DllUnregisterServer on the specified control, using the current
  67. // safety settings.
  68. HRESULT SafeDllUnregisterServerA(
  69. [in] LPCSTR szServerName
  70. );
  71. HRESULT SafeDllUnregisterServerW(
  72. [in] LPCWSTR szServerName
  73. );
  74. // Calls CoGetClassObject for the specified control, using the current
  75. // safety settings.
  76. HRESULT SafeGetClassObject(
  77. [in] REFCLSID rclsid,
  78. [in] DWORD dwClsContext,
  79. [in] LPVOID reserved,
  80. [in] REFIID riid,
  81. [out, iid_is(riid)] IUnknown **ppObj
  82. );
  83. // Calls CoCreateInstance for the specified control, using the current
  84. // safety settings.
  85. HRESULT SafeCreateInstance(
  86. [in] REFCLSID rclsid,
  87. [in] LPUNKNOWN pUnkOuter,
  88. [in] DWORD dwClsContext,
  89. [in] REFIID riid,
  90. [out, iid_is(riid)] IUnknown **pObj
  91. );
  92. }