ExDisp.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:38k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright 1995-1999 Microsoft Corporation. All Rights Reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7. import "ocidl.idl";
  8. import "docobj.idl";
  9. #include <olectl.h>
  10. #include "exdispid.h"
  11. [
  12.     uuid(EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B), // LIBID_ShDocVw
  13.     helpstring("Microsoft Internet Controls"),
  14.     lcid(0x0000),
  15.     version(1.1)
  16. ]
  17. library SHDocVw {
  18.     importlib("stdole2.tlb");
  19.     [
  20.         uuid(EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B), // IID_IWebBrowser
  21.         helpstring("Web Browser interface"),
  22.         helpcontext(0x0000),
  23.         hidden,
  24.         dual,
  25.         oleautomation,
  26.         odl
  27.     ]
  28.     interface IWebBrowser : IDispatch
  29.     {
  30.         [id(100), helpstring("Navigates to the previous item in the history list."), helpcontext(0x0000)]
  31.         HRESULT GoBack();
  32.         [id(101), helpstring("Navigates to the next item in the history list."), helpcontext(0x0000)]
  33.         HRESULT GoForward();
  34.         [id(102), helpstring("Go home/start page."), helpcontext(0x0000)]
  35.         HRESULT GoHome();
  36.         [id(103), helpstring("Go Search Page."), helpcontext(0x0000)]
  37.         HRESULT GoSearch();
  38.         [id(104), helpstring("Navigates to a URL or file."), helpcontext(0x0000)]
  39.         HRESULT Navigate([in] BSTR URL,
  40.                          [in, optional] VARIANT * Flags,
  41.                          [in, optional] VARIANT * TargetFrameName,
  42.                          [in, optional] VARIANT * PostData,
  43.                          [in, optional] VARIANT * Headers);
  44.         typedef
  45.         [
  46.             uuid(14EE5380-A378-11cf-A731-00A0C9082637),
  47.             helpstring("Constants for WebBrowser navigation flags")
  48.         ]
  49.         enum BrowserNavConstants {
  50.             [helpstring("Open in new window")]          navOpenInNewWindow = 0x0001,
  51.             [helpstring("Exclude from history list")]   navNoHistory = 0x0002,
  52.             [helpstring("Don't read from cache")]       navNoReadFromCache = 0x0004,
  53.             [helpstring("Don't write from cache")]      navNoWriteToCache = 0x0008,
  54.             [helpstring("Try other sites on failure")]  navAllowAutosearch = 0x0010,
  55.             [helpstring("OpenBrowserBar")]              navBrowserBar = 0x0020,
  56.         } BrowserNavConstants;
  57.         [id(DISPID_REFRESH), helpstring("Refresh the currently viewed page."), helpcontext(0x0000)]
  58.         HRESULT Refresh();
  59.         // The standard Refresh takes no parameters and we need some... use a new name
  60.         [id(105), helpstring("Refresh the currently viewed page."), helpcontext(0x0000)]
  61.         HRESULT Refresh2([in,optional] VARIANT * Level);
  62.         typedef
  63.         [
  64.             uuid(C317C261-A991-11cf-A731-00A0C9082637),
  65.             helpstring("Constants for Refresh")
  66.         ]
  67.         enum RefreshConstants {                                         // must map to these in sdkincdocobj.h
  68.             [helpstring("Refresh normal")]     REFRESH_NORMAL     = 0,  //== OLECMDIDF_REFRESH_NORMAL
  69.             [helpstring("Refresh if expired")] REFRESH_IFEXPIRED  = 1,  //== OLECMDIDF_REFRESH_IFEXPIRED
  70.             [helpstring("Refresh completely")] REFRESH_COMPLETELY = 3   //== OLECMDIDF_REFRESH_COMPLETELY
  71.         } RefreshConstants;
  72.         [id(106), helpstring("Stops opening a file."), helpcontext(0x0000)]
  73.         HRESULT Stop();
  74.         // Automation heirarchy...
  75.         [id(200), propget, helpstring("Returns the application automation object if accessible, this automation object otherwise.."), helpcontext(0x0000)]
  76.         HRESULT Application([out,retval] IDispatch** ppDisp);
  77.         [id(201), propget, helpstring("Returns the automation object of the container/parent if one exists or this automation object."), helpcontext(0x0000)]
  78.         HRESULT Parent([out,retval] IDispatch** ppDisp);
  79.         [id(202), propget, helpstring("Returns the container/parent automation object, if any."), helpcontext(0x0000)]
  80.         HRESULT Container([out,retval] IDispatch** ppDisp);
  81.         [id(203), propget, helpstring("Returns the active Document automation object, if any."), helpcontext(0x0000)]
  82.         HRESULT Document([out,retval] IDispatch** ppDisp);
  83.         [id(204), propget, helpstring("Returns True if this is the top level object."), helpcontext(0x0000)]
  84.         HRESULT TopLevelContainer([out, retval] VARIANT_BOOL* pBool);
  85.         [id(205), propget, helpstring("Returns the type of the contained document object."), helpcontext(0x0000)]
  86.         HRESULT Type([out,retval] BSTR* Type);
  87.         // Window stuff...
  88.         [id(206), propget, helpstring("The horizontal position (pixels) of the frame window relative to the screen/container."), helpcontext(0x0000)]
  89.         HRESULT Left([out, retval] long *pl);
  90.         [id(206), propput]
  91.         HRESULT Left([in] long Left);
  92.         [id(207), propget, helpstring("The vertical position (pixels) of the frame window relative to the screen/container."), helpcontext(0x0000)]
  93.         HRESULT Top([out, retval] long *pl);
  94.         [id(207), propput]
  95.         HRESULT Top([in] long Top);
  96.         [id(208), propget, helpstring("The horizontal dimension (pixels) of the frame window/object."), helpcontext(0x0000)]
  97.         HRESULT Width([out, retval] long *pl);
  98.         [id(208), propput]
  99.         HRESULT Width([in] long Width);
  100.         [id(209), propget, helpstring("The vertical dimension (pixels) of the frame window/object."), helpcontext(0x0000)]
  101.         HRESULT Height([out, retval] long *pl);
  102.         [id(209), propput]
  103.         HRESULT Height([in] long Height);
  104.         // WebBrowser stuff...
  105.         [id(210), propget, helpstring("Gets the short (UI-friendly) name of the URL/file currently viewed."), helpcontext(0x0000)]
  106.         HRESULT LocationName([out,retval] BSTR *LocationName);
  107.         [id(211), propget, helpstring("Gets the full URL/path currently viewed."), helpcontext(0x0000)]
  108.         HRESULT LocationURL([out,retval] BSTR * LocationURL);
  109.         // Added a property to see if the viewer is currenly busy or not...
  110.         [id(212), propget, helpstring("Query to see if something is still in progress."), helpcontext(0x0000)]
  111.         HRESULT Busy([out,retval] VARIANT_BOOL *pBool);
  112.     }
  113.     [
  114.         uuid(EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B), // DIID_DWebBrowserEvents
  115.         helpstring("Web Browser Control Events (old)"),
  116.         hidden
  117.     ]
  118.     dispinterface DWebBrowserEvents
  119.     {
  120.         properties:
  121.         methods:
  122.         [id(DISPID_BEFORENAVIGATE), helpstring("Fired when a new hyperlink is being navigated to."), helpcontext(0x0000)]
  123.         void BeforeNavigate([in] BSTR URL, long Flags, BSTR TargetFrameName, VARIANT * PostData, BSTR Headers, [in, out]VARIANT_BOOL * Cancel);
  124.         [id(DISPID_NAVIGATECOMPLETE), helpstring("Fired when the document being navigated to becomes visible and enters the navigation stack."), helpcontext(0x0000)]
  125.         void NavigateComplete([in] BSTR URL );
  126.         [id(DISPID_STATUSTEXTCHANGE), helpstring("Statusbar text changed."), helpcontext(0x0000)]
  127.         void StatusTextChange([in]BSTR Text);
  128.         [id(DISPID_PROGRESSCHANGE), helpstring("Fired when download progress is updated."), helpcontext(0x0000)]
  129.         void ProgressChange([in] long Progress, [in] long ProgressMax);
  130.         [id(DISPID_DOWNLOADCOMPLETE), helpstring("Download of page complete."), helpcontext(0x0000)]
  131.         void DownloadComplete();
  132.         [id(DISPID_COMMANDSTATECHANGE), helpstring("The enabled state of a command changed"), helpcontext(0x0000)]
  133.         void CommandStateChange([in] long Command, [in] VARIANT_BOOL Enable);
  134.         [id(DISPID_DOWNLOADBEGIN), helpstring("Download of a page started."), helpcontext(0x000)]
  135.         void DownloadBegin();
  136.         [id(DISPID_NEWWINDOW), helpstring("Fired when a new window should be created."), helpcontext(0x0000)]
  137.         void NewWindow([in] BSTR URL, [in] long Flags, [in] BSTR TargetFrameName, [in] VARIANT * PostData, [in] BSTR Headers, [in,out] VARIANT_BOOL * Processed);
  138.         [id(DISPID_TITLECHANGE), helpstring("Document title changed."), helpcontext(0x0000)]
  139.         void TitleChange([in]BSTR Text);
  140.         [id(DISPID_FRAMEBEFORENAVIGATE), helpstring("Fired when a new hyperlink is being navigated to in a frame."), helpcontext(0x0000)]
  141.         void FrameBeforeNavigate([in] BSTR URL, long Flags, BSTR TargetFrameName, VARIANT * PostData, BSTR Headers, [in, out]VARIANT_BOOL * Cancel);
  142.         [id(DISPID_FRAMENAVIGATECOMPLETE), helpstring("Fired when a new hyperlink is being navigated to in a frame."), helpcontext(0x0000)]
  143.         void FrameNavigateComplete([in] BSTR URL );
  144.         [id(DISPID_FRAMENEWWINDOW), helpstring("Fired when a new window should be created."), helpcontext(0x0000)]
  145.         void FrameNewWindow([in] BSTR URL, [in] long Flags, [in] BSTR TargetFrameName, [in] VARIANT * PostData, [in] BSTR Headers, [in,out] VARIANT_BOOL * Processed);
  146.         // The following are IWebBrowserApp specific:
  147.         //
  148.         [id(DISPID_QUIT), helpstring("Fired when application is quiting."), helpcontext(0x0000)]
  149.         void Quit([in, out] VARIANT_BOOL * Cancel);
  150.         [id(DISPID_WINDOWMOVE), helpstring("Fired when window has been moved."), helpcontext(0x0000)]
  151.         void WindowMove();
  152.         [id(DISPID_WINDOWRESIZE), helpstring("Fired when window has been sized."), helpcontext(0x0000)]
  153.         void WindowResize();
  154.         [id(DISPID_WINDOWACTIVATE), helpstring("Fired when window has been activated."), helpcontext(0x0000)]
  155.         void WindowActivate();
  156.         [id(DISPID_PROPERTYCHANGE), helpstring("Fired when the PutProperty method has been called."), helpcontext(0x0000)]
  157.         void PropertyChange([in] BSTR Property);
  158.     }
  159.     typedef
  160.     [
  161.         uuid(34A226E0-DF30-11CF-89A9-00A0C9054129),
  162.         helpstring("Constants for WebBrowser CommandStateChange")
  163.     ]
  164.     enum CommandStateChangeConstants {
  165.         [helpstring("Command Change")]      CSC_UPDATECOMMANDS  = 0xFFFFFFFF,
  166.         [helpstring("Navigate Forward")]    CSC_NAVIGATEFORWARD = 0x00000001,
  167.         [helpstring("Navigate Back")]       CSC_NAVIGATEBACK    = 0x00000002,
  168.     } CommandStateChangeConstants;
  169.     [
  170.         uuid(0002DF05-0000-0000-C000-000000000046), // IID_IWebBrowserApp
  171.         helpstring("Web Browser Application Interface."),
  172.         helpcontext(0x0000),
  173.         hidden,
  174.         oleautomation,
  175.         dual
  176.     ]
  177.     interface IWebBrowserApp : IWebBrowser
  178.     {
  179.         [id(300), helpstring("Exits application and closes the open document."), helpcontext(0x0000)]
  180.         HRESULT Quit();
  181.         [id(301), helpstring("Converts client sizes into window sizes."), helpcontext(0x0000)]
  182.         HRESULT ClientToWindow([in,out] int* pcx, [in,out] int* pcy);
  183.         [id(302), helpstring("Associates vtValue with the name szProperty in the context of the object."), helpcontext(0x0000)]
  184.         HRESULT PutProperty([in] BSTR Property, [in] VARIANT vtValue);
  185.         [id(303), helpstring("Retrieve the Associated value for the property vtValue in the context of the object."), helpcontext(0x0000)]
  186.         HRESULT GetProperty([in] BSTR Property, [out, retval] VARIANT *pvtValue);
  187.         [id(0), propget, helpstring("Returns name of the application."), helpcontext(0x0000)]
  188.         HRESULT Name([out,retval] BSTR* Name);
  189.         [id(DISPID_HWND), propget, helpstring("Returns the HWND of the current IE window."), helpcontext(0x0000)]
  190.         HRESULT HWND([out,retval] long *pHWND);
  191.         [id(400), propget, helpstring("Returns file specification of the application, including path."), helpcontext(0x0000)]
  192.         HRESULT FullName([out,retval] BSTR* FullName);
  193.         [id(401), propget, helpstring("Returns the path to the application."), helpcontext(0x0000)]
  194.         HRESULT Path([out,retval] BSTR* Path);
  195.         [id(402), propget, helpstring("Determines whether the application is visible or hidden."), helpcontext(0x0000)]
  196.         HRESULT Visible([out, retval] VARIANT_BOOL* pBool);
  197.         [id(402), propput, helpstring("Determines whether the application is visible or hidden."), helpcontext(0x0000)]
  198.         HRESULT Visible([in] VARIANT_BOOL Value);
  199.         [id(403), propget, helpstring("Turn on or off the statusbar."), helpcontext(0x0000)]
  200.         HRESULT StatusBar([out, retval] VARIANT_BOOL* pBool);
  201.         [id(403), propput, helpstring("Turn on or off the statusbar."), helpcontext(0x0000)]
  202.         HRESULT StatusBar([in] VARIANT_BOOL Value);
  203.         [id(404), propget, helpstring("Text of Status window."), helpcontext(0x0000)]
  204.         HRESULT StatusText([out, retval] BSTR *StatusText);
  205.         [id(404), propput, helpstring("Text of Status window."), helpcontext(0x0000)]
  206.         HRESULT StatusText([in] BSTR StatusText);
  207.         [id(405), propget, helpstring("Controls which toolbar is shown."), helpcontext(0x0000)]
  208.         HRESULT ToolBar([out, retval] int * Value);
  209.         [id(405), propput, helpstring("Controls which toolbar is shown."), helpcontext(0x0000)]
  210.         HRESULT ToolBar([in] int Value);
  211.         [id(406), propget, helpstring("Controls whether menubar is shown."), helpcontext(0x0000)]
  212.         HRESULT MenuBar([out, retval] VARIANT_BOOL * Value);
  213.         [id(406), propput, helpstring("Controls whether menubar is shown."), helpcontext(0x0000)]
  214.         HRESULT MenuBar([in] VARIANT_BOOL Value);
  215.         [id(407), propget, helpstring("Maximizes window and turns off statusbar, toolbar, menubar, and titlebar."), helpcontext(0x0000)]
  216.         HRESULT FullScreen([out, retval] VARIANT_BOOL * pbFullScreen);
  217.         [id(407), propput, helpstring("Maximizes window and turns off statusbar, toolbar, menubar, and titlebar."), helpcontext(0x0000)]
  218.         HRESULT FullScreen([in] VARIANT_BOOL bFullScreen);
  219.     }
  220.     [
  221.         uuid(D30C1661-CDAF-11d0-8A3E-00C04FC9E26E), // IID_IWebBrowser2
  222.         helpstring("Web Browser Interface for IE4."),
  223.         helpcontext(0x0000),
  224.         hidden,
  225.         oleautomation,
  226.         dual
  227.     ]
  228.     interface IWebBrowser2 : IWebBrowserApp
  229.     {
  230.         [id(500), helpstring("Navigates to a URL or file or pidl."), helpcontext(0x0000)]
  231.         HRESULT Navigate2([in] VARIANT * URL,
  232.                           [in, optional] VARIANT * Flags,
  233.                           [in, optional] VARIANT * TargetFrameName,
  234.                           [in, optional] VARIANT * PostData,
  235.                           [in, optional] VARIANT * Headers);
  236.         [id(501), helpstring("IOleCommandTarget::QueryStatus"), helpcontext(0x0000)]
  237.         HRESULT QueryStatusWB([in] OLECMDID cmdID, [out, retval] OLECMDF * pcmdf);
  238.         [id(502), helpstring("IOleCommandTarget::Exec"), helpcontext(0x0000)]
  239.         HRESULT ExecWB([in] OLECMDID cmdID, [in] OLECMDEXECOPT cmdexecopt, [in, optional] VARIANT * pvaIn, [out, in, optional] VARIANT * pvaOut);
  240.         [id(503), helpstring("Set BrowserBar to Clsid"), helpcontext(0x0000)]
  241.         HRESULT ShowBrowserBar( [in] VARIANT * pvaClsid,
  242.                                 [in, optional] VARIANT * pvarShow,
  243.                                 [in, optional] VARIANT * pvarSize );
  244.         [id(DISPID_READYSTATE), propget, bindable]
  245.         HRESULT ReadyState([retval, out] READYSTATE * plReadyState);
  246.         [id(550), propget, helpstring("Controls if the frame is offline (read from cache)"), helpcontext(0x0000)]
  247.         HRESULT Offline([out, retval] VARIANT_BOOL * pbOffline);
  248.         [id(550), propput, helpstring("Controls if the frame is offline (read from cache)"), helpcontext(0x0000)]
  249.         HRESULT Offline([in] VARIANT_BOOL bOffline);
  250.         [id(551), propget, helpstring("Controls if any dialog boxes can be shown"), helpcontext(0x0000)]
  251.         HRESULT Silent([out, retval] VARIANT_BOOL * pbSilent);
  252.         [id(551), propput, helpstring("Controls if any dialog boxes can be shown"), helpcontext(0x0000)]
  253.         HRESULT Silent([in] VARIANT_BOOL bSilent);
  254.         [id(552), propget, helpstring("Registers OC as a top-level browser (for target name resolution)"), helpcontext(0x0000)]
  255.         HRESULT RegisterAsBrowser([out, retval] VARIANT_BOOL * pbRegister);
  256.         [id(552), propput, helpstring("Registers OC as a top-level browser (for target name resolution)"), helpcontext(0x0000)]
  257.         HRESULT RegisterAsBrowser([in] VARIANT_BOOL bRegister);
  258.         [id(553), propget, helpstring("Registers OC as a drop target for navigation"), helpcontext(0x0000)]
  259.         HRESULT RegisterAsDropTarget([out, retval] VARIANT_BOOL * pbRegister);
  260.         [id(553), propput, helpstring("Registers OC as a drop target for navigation"), helpcontext(0x0000)]
  261.         HRESULT RegisterAsDropTarget([in] VARIANT_BOOL bRegister);
  262.         [id(554), propget, helpstring("Controls if the browser is in theater mode"), helpcontext(0x0000)]
  263.         HRESULT TheaterMode([out, retval] VARIANT_BOOL * pbRegister);
  264.         [id(554), propput, helpstring("Controls if the browser is in theater mode"), helpcontext(0x0000)]
  265.         HRESULT TheaterMode([in] VARIANT_BOOL bRegister);
  266.         [id(555), propget, helpstring("Controls whether address bar is shown"), helpcontext(0x0000)]
  267.         HRESULT AddressBar([out, retval] VARIANT_BOOL * Value);
  268.         [id(555), propput, helpstring("Controls whether address bar is shown"), helpcontext(0x0000)]
  269.         HRESULT AddressBar([in] VARIANT_BOOL Value);
  270.         [id(556), propget, helpstring("Controls whether the window is resizable"), helpcontext(0x0000)]
  271.         HRESULT Resizable([out, retval] VARIANT_BOOL * Value);
  272.         [id(556), propput, helpstring("Controls whether the window is resizable"), helpcontext(0x0000)]
  273.         HRESULT Resizable([in] VARIANT_BOOL Value);
  274.     }
  275.     [
  276.         uuid(34A715A0-6587-11D0-924A-0020AFC7AC4D), // IID_DWebBrowserEvents2
  277.         helpstring("Web Browser Control events interface"),
  278.         hidden
  279.     ]
  280.     dispinterface DWebBrowserEvents2
  281.     {
  282.         properties:
  283.         methods:
  284.         [id(DISPID_STATUSTEXTCHANGE), helpstring("Statusbar text changed."), helpcontext(0x0000)]
  285.         void StatusTextChange([in]BSTR Text);
  286.         [id(DISPID_PROGRESSCHANGE), helpstring("Fired when download progress is updated."), helpcontext(0x0000)]
  287.         void ProgressChange([in] long Progress, [in] long ProgressMax);
  288.         [id(DISPID_COMMANDSTATECHANGE), helpstring("The enabled state of a command changed."), helpcontext(0x0000)]
  289.         void CommandStateChange([in] long Command, [in] VARIANT_BOOL Enable);
  290.         [id(DISPID_DOWNLOADBEGIN), helpstring("Download of a page started."), helpcontext(0x000)]
  291.         void DownloadBegin();
  292.         [id(DISPID_DOWNLOADCOMPLETE), helpstring("Download of page complete."), helpcontext(0x0000)]
  293.         void DownloadComplete();
  294.         [id(DISPID_TITLECHANGE), helpstring("Document title changed."), helpcontext(0x0000)]
  295.         void TitleChange([in] BSTR Text);
  296.         [id(DISPID_PROPERTYCHANGE), helpstring("Fired when the PutProperty method has been called."), helpcontext(0x0000)]
  297.         void PropertyChange([in] BSTR szProperty);
  298.         // New events for IE40:
  299.         //
  300.         [id(DISPID_BEFORENAVIGATE2), helpstring("Fired before navigate occurs in the given WebBrowser (window or frameset element). The processing of this navigation may be modified."), helpcontext(0x0000)]
  301.         void BeforeNavigate2([in] IDispatch* pDisp,
  302.                              [in] VARIANT * URL, [in] VARIANT * Flags, [in] VARIANT * TargetFrameName, [in] VARIANT * PostData, [in] VARIANT * Headers,
  303.                              [in,out] VARIANT_BOOL * Cancel);
  304.         [id(DISPID_NEWWINDOW2), helpstring("A new, hidden, non-navigated WebBrowser window is needed."), helpcontext(0x0000)]
  305.         void NewWindow2([in, out] IDispatch** ppDisp, [in, out] VARIANT_BOOL * Cancel);
  306.         [id(DISPID_NAVIGATECOMPLETE2), helpstring("Fired when the document being navigated to becomes visible and enters the navigation stack."), helpcontext(0x0000)]
  307.         void NavigateComplete2([in] IDispatch* pDisp, [in] VARIANT * URL );
  308.         [id(DISPID_DOCUMENTCOMPLETE), helpstring("Fired when the document being navigated to reaches ReadyState_Complete."), helpcontext(0x0000)]
  309.         void DocumentComplete([in] IDispatch* pDisp, [in] VARIANT * URL );
  310.         [id(DISPID_ONQUIT), helpstring("Fired when application is quiting."), helpcontext(0x0000)]
  311.         void OnQuit();
  312.         [id(DISPID_ONVISIBLE), helpstring("Fired when the window should be shown/hidden"), helpcontext(0x0000)]
  313.         void OnVisible([in] VARIANT_BOOL Visible);
  314.         [id(DISPID_ONTOOLBAR), helpstring("Fired when the toolbar  should be shown/hidden"), helpcontext(0x0000)]
  315.         void OnToolBar([in] VARIANT_BOOL ToolBar);
  316.         [id(DISPID_ONMENUBAR), helpstring("Fired when the menubar should be shown/hidden"), helpcontext(0x0000)]
  317.         void OnMenuBar([in] VARIANT_BOOL MenuBar);
  318.         [id(DISPID_ONSTATUSBAR), helpstring("Fired when the statusbar should be shown/hidden"), helpcontext(0x0000)]
  319.         void OnStatusBar([in] VARIANT_BOOL StatusBar);
  320.         [id(DISPID_ONFULLSCREEN), helpstring("Fired when fullscreen mode should be on/off"), helpcontext(0x0000)]
  321.         void OnFullScreen([in] VARIANT_BOOL FullScreen);
  322.         [id(DISPID_ONTHEATERMODE), helpstring("Fired when theater mode should be on/off"), helpcontext(0x0000)]
  323.         void OnTheaterMode([in] VARIANT_BOOL TheaterMode);
  324.     }
  325.     [
  326.         uuid(EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B), // v.1 clsid CLSID_WebBrowser_V1
  327.         control,
  328.         helpstring("WebBrowser Control")
  329.     ]
  330.     coclass WebBrowser_V1
  331.     {
  332.                           interface     IWebBrowser2;
  333.         [default]         interface     IWebBrowser;
  334.         [source]          dispinterface DWebBrowserEvents2;
  335.         [default, source] dispinterface DWebBrowserEvents;
  336.     }
  337.     [
  338.         uuid(8856F961-340A-11D0-A96B-00C04FD705A2), // v.2 clsid CLSID_WebBrowser
  339.         control,
  340.         helpstring("WebBrowser Control")
  341.     ]
  342.     coclass WebBrowser
  343.     {
  344.         [default]         interface     IWebBrowser2;
  345.                           interface     IWebBrowser;
  346.         [default, source] dispinterface DWebBrowserEvents2;
  347.         [source]          dispinterface DWebBrowserEvents;
  348.     }
  349.     [
  350.         uuid(0002DF01-0000-0000-C000-000000000046), // CLSID_InternetExplorer
  351.         helpstring("Internet Explorer Application."),
  352.     ]
  353.     coclass InternetExplorer
  354.     {
  355.         [default]         interface     IWebBrowser2;
  356.                           interface     IWebBrowserApp;
  357.         [default, source] dispinterface DWebBrowserEvents2;
  358.         [source]          dispinterface DWebBrowserEvents;
  359.     }
  360.     [
  361.         uuid(c08afd90-f2a1-11d1-8455-00a0c91f3880), // CLSID_ShellBrowser
  362.         helpstring("Shell Browser Window."),
  363.         hidden,
  364.     ]
  365.     coclass ShellBrowserWindow
  366.     {
  367.         [default]         interface     IWebBrowser2;
  368.                           interface     IWebBrowserApp;
  369.         [default, source] dispinterface DWebBrowserEvents2;
  370.         [source]          dispinterface DWebBrowserEvents;
  371.     }
  372.     typedef
  373.     [
  374.         uuid(F41E6981-28E5-11d0-82B4-00A0C90C29C5),
  375.         helpstring("Constants for ShellWindows registration")
  376.     ]
  377.     enum ShellWindowTypeConstants {
  378.         [helpstring("Explorer")]                    SWC_EXPLORER    = 0x0,
  379.         [helpstring("Various Browsing Windows")]    SWC_BROWSER     = 0x00000001,
  380.         [helpstring("3rd Party Browsers")]          SWC_3RDPARTY    = 0x00000002,
  381.         [helpstring("Creation Callback")]           SWC_CALLBACK    = 0x00000004,
  382.     } ShellWindowTypeConstants;
  383.     typedef
  384.     [
  385.         uuid(7716a370-38ca-11d0-a48b-00a0c90a8f39),
  386.         helpstring("Options for ShellWindows FindWindow"),
  387.         hidden
  388.     ]
  389.     enum ShellWindowFindWindowOptions {
  390.         [helpstring("Need Dispatch")]           SWFO_NEEDDISPATCH   = 0x00000001,
  391.         [helpstring("Include Pending")]         SWFO_INCLUDEPENDING = 0x00000002,
  392.         [helpstring("Cookie Passed")]           SWFO_COOKIEPASSED   = 0x00000004,
  393.     } ShellWindowFindWindowOptions;
  394.     [
  395.         uuid(fe4106e0-399a-11d0-a48c-00a0c90a8f39), // DIID_DShellWindowsEvents
  396.         helpstring("Event interface for IShellWindows"),
  397.     ]
  398.     dispinterface DShellWindowsEvents
  399.     {
  400.         properties:
  401.         methods:
  402.         [id(DISPID_WINDOWREGISTERED), helpstring("A new window was registered."), helpcontext(0x0000)]
  403.         void WindowRegistered([in] long lCookie);
  404.         [id(DISPID_WINDOWREVOKED), helpstring("A new window was revoked."), helpcontext(0x0000)]
  405.         void WindowRevoked([in] long lCookie);
  406.     }
  407.     [
  408.         uuid(85CB6900-4D95-11CF-960C-0080C7F4EE85),     // IID_IShellWindows
  409.         helpstring("Definition of interface IShellWindows"),
  410.         oleautomation,
  411.         dual,
  412.         odl,
  413.     ]
  414.     interface IShellWindows : IDispatch
  415.     {
  416.         //Properties
  417.         [propget, helpstring("Get count of open Shell windows")]
  418.         HRESULT Count([out, retval] long *Count);
  419.         //Methods
  420.         [id(0), helpstring("Return the shell window for the given index")]
  421.         HRESULT Item([in,optional] VARIANT index, [out, retval]IDispatch **Folder);
  422.         [id(-4), helpstring("Enumerates the figures")]
  423.         HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  424.         // Some private hidden members to allow shell windows to add and
  425.         // remove themself from the list.  We mark them hidden to keep
  426.         // random VB apps from trying to Register...
  427.         [helpstring("Register a window with the list"), hidden]
  428.         HRESULT Register([in] IDispatch *pid,
  429.                          [in] long hwnd,
  430.                          [in] int swClass,
  431.                          [out]long *plCookie);
  432.         [helpstring("Register a pending open with the list"), hidden]
  433.         HRESULT RegisterPending([in] long lThreadId,
  434.                          [in] VARIANT* pvarloc,     // will hold pidl that is being opened.
  435.                          [in] VARIANT* pvarlocRoot, // Optional root pidl
  436.                          [in] int swClass,
  437.                          [out]long *plCookie);
  438.         [helpstring("Remove a window from the list"), hidden]
  439.         HRESULT Revoke([in]long lCookie);
  440.         // As an optimization, each window notifies the new location
  441.         // only when
  442.         //  (1) it's being deactivated
  443.         //  (2) getFullName is called (we overload it to force update)
  444.         [helpstring("Notifies the new location"), hidden]
  445.         HRESULT OnNavigate([in]long lCookie, [in] VARIANT* pvarLoc);
  446.         [helpstring("Notifies the activation"), hidden]
  447.         HRESULT OnActivated([in]long lCookie, [in] VARIANT_BOOL fActive);
  448.         [helpstring("Find the window based on the location"), hidden]
  449.         HRESULT FindWindow([in] VARIANT* pvarLoc,
  450.                            [in] VARIANT* pvarLocRoot,
  451.                            [in] int swClass,
  452.                            [out] long * phwnd,
  453.                            [in] int swfwOptions,
  454.                            [out,retval] IDispatch** ppdispOut);
  455.         [helpstring("Notifies on creation and frame name set"), hidden]
  456.         HRESULT OnCreated([in]long lCookie,[in] IUnknown *punk);
  457.         [helpstring("Used by IExplore to register different processes"), hidden]
  458.         HRESULT ProcessAttachDetach([in] VARIANT_BOOL fAttach);
  459.     }
  460.     [
  461.         uuid(9BA05972-F6A8-11CF-A442-00A0C90A8F39),     // CLSID_ShellWindows
  462.         helpstring("ShellDispatch Load in Shell Context")
  463.     ]
  464.     coclass ShellWindows
  465.     {
  466.         [default] interface IShellWindows;
  467.         [default, source] dispinterface DShellWindowsEvents;
  468.     }
  469.     [
  470.         uuid(729FE2F8-1EA8-11d1-8F85-00C04FC2FBE1),     // IID_IShellUIHelper
  471.         helpstring("Shell UI Helper Control Interface"),
  472.         oleautomation, dual
  473.     ]
  474.     interface IShellUIHelper : IDispatch
  475.     {
  476.         [hidden, id(DISPID_RESETFIRSTBOOTMODE)] HRESULT ResetFirstBootMode();
  477.         [hidden, id(DISPID_RESETSAFEMODE)] HRESULT ResetSafeMode();
  478.         [hidden, id(DISPID_REFRESHOFFLINEDESKTOP)] HRESULT RefreshOfflineDesktop();
  479.         [id(DISPID_ADDFAVORITE)] HRESULT AddFavorite([in] BSTR URL, [optional, in] VARIANT *Title);
  480.         [id(DISPID_ADDCHANNEL)] HRESULT AddChannel([in] BSTR URL);
  481.         [id(DISPID_ADDDESKTOPCOMPONENT)] HRESULT AddDesktopComponent([in] BSTR URL, [in] BSTR Type,
  482.             [optional, in] VARIANT *Left,
  483.             [optional, in] VARIANT *Top,
  484.             [optional, in] VARIANT *Width,
  485.             [optional, in] VARIANT *Height);
  486.         [id(DISPID_ISSUBSCRIBED)] HRESULT IsSubscribed([in] BSTR URL, [out,retval] VARIANT_BOOL* pBool);
  487.         [id(DISPID_NAVIGATEANDFIND)] HRESULT NavigateAndFind([in] BSTR URL, [in] BSTR strQuery, [in] VARIANT* varTargetFrame);
  488.         [id(DISPID_IMPORTEXPORTFAVORITES)] HRESULT ImportExportFavorites([in] VARIANT_BOOL fImport, [in] BSTR strImpExpPath);
  489.         [id(DISPID_AUTOCOMPLETESAVEFORM)] HRESULT AutoCompleteSaveForm([optional, in] VARIANT *Form);
  490.         [id(DISPID_AUTOSCAN)] HRESULT AutoScan([in] BSTR strSearch, [in] BSTR strFailureUrl, [optional, in] VARIANT* pvarTargetFrame);
  491.         [hidden, id(DISPID_AUTOCOMPLETEATTACH)] HRESULT AutoCompleteAttach([optional, in] VARIANT *Reserved);
  492.         [id(DISPID_SHOWBROWSERUI)] HRESULT ShowBrowserUI([in] BSTR bstrName, [in] VARIANT *pvarIn, [out, retval] VARIANT *pvarOut);
  493.     }
  494.     [
  495.         uuid(64AB4BB7-111E-11d1-8F79-00C04FC2FBE1)  // CLSID_ShellUIHelper
  496.     ]
  497.     coclass ShellUIHelper
  498.     {
  499.         [default] interface IShellUIHelper;
  500.     }
  501.     [
  502.         uuid(55136806-B2DE-11D1-B9F2-00A0C98BC547)      //DIID_DShellFavoritesNameSpaceEvents
  503.     ]
  504.     dispinterface _ShellFavoritesNameSpaceEvents
  505.     {
  506.         properties:
  507.         methods:
  508.             [id(1)] void FavoritesSelectionChange([in] long cItems, [in] long hItem, [in] BSTR strName,
  509.                              [in] BSTR strUrl, [in] long cVisits, [in] BSTR strDate,
  510.                              [in] BOOL fAvailableOffline);
  511.     }
  512.     [
  513.         object,
  514.         uuid(55136804-B2DE-11D1-B9F2-00A0C98BC547),     //IID_IShellFavoritesNameSpace
  515.         dual,
  516.         helpstring("IShellFavoritesNameSpace Interface"),
  517.         pointer_default(unique)
  518.     ]
  519.     interface IShellFavoritesNameSpace : IDispatch
  520.     {
  521.         [hidden, id(1), helpstring("method MoveSelectionUp")] HRESULT MoveSelectionUp();
  522.         [hidden, id(2), helpstring("method MoveSelectionDown")] HRESULT MoveSelectionDown();
  523.         [hidden, id(3), helpstring("method ResetSort")] HRESULT ResetSort();
  524.         [hidden, id(4), helpstring("method NewFolder")] HRESULT NewFolder();
  525.         [hidden, id(5), helpstring("method Synchronize")] HRESULT Synchronize();
  526.         [hidden, id(6), helpstring("method Import")] HRESULT Import();
  527.         [hidden, id(7), helpstring("method Export")] HRESULT Export();
  528.         [hidden, id(8), helpstring("method InvokeContextMenuCommand")] HRESULT InvokeContextMenuCommand([in] BSTR strCommand);
  529.         [hidden, id(9), helpstring("method MoveSelectionTo")] HRESULT MoveSelectionTo();
  530.         [hidden, propget, id(10), helpstring("Query to see if offline pack is installed")]
  531.             HRESULT FOfflinePackInstalled([out, retval] VARIANT_BOOL *pBool);
  532.         [hidden, id(11), helpstring("method CreateSubscriptionForSelection")] HRESULT CreateSubscriptionForSelection([out, retval] VARIANT_BOOL *pBool);
  533.         [hidden, id(12), helpstring("method DeleteSubscriptionForSelection")] HRESULT DeleteSubscriptionForSelection([out, retval] VARIANT_BOOL *pBool);
  534.         [hidden, id(13), helpstring("method SetRoot")] HRESULT SetRoot([in] BSTR bstrFullPath);
  535.     }
  536.     [
  537.         uuid(55136805-B2DE-11D1-B9F2-00A0C98BC547)      //CLSID_ShellFavoritesNameSpace
  538.     ]
  539.     coclass ShellFavoritesNameSpace
  540.     {
  541.         [default] interface IShellFavoritesNameSpace;
  542.         [default, source] dispinterface _ShellFavoritesNameSpaceEvents;
  543.     };
  544.     [
  545.         uuid(F3470F24-15FD-11d2-BB2E-00805FF7EFCA), // IID_IScriptErrorList
  546.         helpstring("Script Error List Interface"),
  547.         oleautomation,
  548.         hidden,
  549.         dual
  550.     ]
  551.     interface IScriptErrorList : IDispatch
  552.     {
  553.         // navigation through list of errors
  554.         [id(DISPID_ADVANCEERROR)] HRESULT advanceError();
  555.         [id(DISPID_RETREATERROR)] HRESULT retreatError();
  556.         [id(DISPID_CANADVANCEERROR)] HRESULT canAdvanceError([out, retval] BOOL * pfCanAdvance);
  557.         [id(DISPID_CANRETREATERROR)] HRESULT canRetreatError([out, retval] BOOL * pfCanRetreat);
  558.         // data access for the current error in the error list
  559.         [id(DISPID_GETERRORLINE)] HRESULT getErrorLine([out, retval] LONG * plLine);
  560.         [id(DISPID_GETERRORCHAR)] HRESULT getErrorChar([out, retval] LONG * plChar);
  561.         [id(DISPID_GETERRORCODE)] HRESULT getErrorCode([out, retval] LONG * plCode);
  562.         [id(DISPID_GETERRORMSG)] HRESULT getErrorMsg([out, retval] BSTR * pstr);
  563.         [id(DISPID_GETERRORURL)] HRESULT getErrorUrl([out, retval] BSTR * pstr);
  564.         [id(DISPID_GETALWAYSSHOWLOCKSTATE)] HRESULT getAlwaysShowLockState([out, retval] BOOL * pfAlwaysShowLocked);
  565.         [id(DISPID_GETDETAILSSTATE)] HRESULT getDetailsPaneOpen([out, retval] BOOL * pfDetailsPaneOpen);
  566.         [id(DISPID_SETDETAILSSTATE)] HRESULT setDetailsPaneOpen(BOOL fDetailsPaneOpen);
  567.         [id(DISPID_GETPERERRSTATE)] HRESULT getPerErrorDisplay([out, retval] BOOL * pfPerErrorDisplay);
  568.         [id(DISPID_SETPERERRSTATE)] HRESULT setPerErrorDisplay(BOOL fPerErrorDisplay);
  569.     }
  570.     [
  571.         uuid(EFD01300-160F-11d2-BB2E-00805FF7EFCA),  // CLSID_ScriptErrorList
  572.         hidden
  573.     ]
  574.     coclass CScriptErrorList
  575.     {
  576.         [default] interface IScriptErrorList;
  577.     }
  578.     [
  579.         uuid(ba9239a4-3dd5-11d2-bf8b-00c04fb93661), // IID_ISearch
  580.         helpstring("Enumerated Search"),
  581.         hidden,
  582.         oleautomation,
  583.         dual,
  584.         odl,
  585.     ]
  586.     interface ISearch : IDispatch
  587.     {
  588.         [propget, helpstring("Get search title")]
  589.         HRESULT Title([out, retval] BSTR *pbstrTitle);
  590.         [propget, helpstring("Get search guid")]
  591.         HRESULT Id([out, retval] BSTR *pbstrId);
  592.         [propget, helpstring("Get search url")]
  593.         HRESULT Url([out, retval] BSTR *pbstrUrl);
  594.     }
  595.     [
  596.         uuid(47c922a2-3dd5-11d2-bf8b-00c04fb93661), // IID_ISearches
  597.         helpstring("Searches Enum"),
  598.         hidden,
  599.         oleautomation,
  600.         dual,
  601.         odl,
  602.     ]
  603.     interface ISearches : IDispatch
  604.     {
  605.         [propget, helpstring("Get the count of searches")]
  606.         HRESULT Count([out, retval] long *plCount);
  607.         [propget, helpstring("Get the default search name")]
  608.         HRESULT Default([out, retval] BSTR *pbstrDefault);
  609.         [helpstring("Return the specified search")]
  610.         HRESULT Item([in,optional] VARIANT index, [out, retval]ISearch **ppid);
  611.         [id(-4), helpstring("Enumerates the searches")]
  612.         HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  613.     }
  614.     [
  615.         object,
  616.         uuid(72423E8F-8011-11d2-BE79-00A0C9A83DA1),
  617.         hidden,
  618.         dual,
  619.         helpstring("ISearchAssistantOC Interface"),
  620.         pointer_default(unique)
  621.     ]
  622.     interface ISearchAssistantOC : IDispatch
  623.     {
  624.         [id(1)] HRESULT AddNextMenuItem([in] BSTR bstrText, [in] long idItem);
  625.         [id(2)] HRESULT SetDefaultSearchUrl([in] BSTR bstrUrl);
  626.         [id(3)] HRESULT NavigateToDefaultSearch();
  627.         [id(4)] HRESULT IsRestricted([in] BSTR bstrGuid, [out, retval] VARIANT_BOOL *pVal);
  628.         [propget, id(5), helpstring("property ShellFeaturesEnabled")] HRESULT ShellFeaturesEnabled([out, retval] VARIANT_BOOL *pVal);
  629.         [propget, id(6), helpstring("property SearchAssistantDefault")] HRESULT SearchAssistantDefault([out, retval] VARIANT_BOOL *pVal);
  630.         [propget, id(7), helpstring("Get searches")] HRESULT Searches([out, retval] ISearches **ppid);
  631.         [propget, id(8), helpstring("Returns true if the current folder is web folder")] HRESULT InWebFolder([out, retval] VARIANT_BOOL *pVal);
  632.         [id(9)] HRESULT PutProperty([in] VARIANT_BOOL bPerLocale, [in] BSTR bstrName, [in] BSTR bstrValue);
  633.         [id(10)] HRESULT GetProperty([in] VARIANT_BOOL bPerLocale, [in] BSTR bstrName, [out, retval] BSTR *pbstrValue);
  634.         [propput, id(11)] HRESULT EventHandled([in] VARIANT_BOOL bHandled);
  635.         [id(12)] HRESULT ResetNextMenu();
  636.         [id(13)] HRESULT FindOnWeb() ;
  637.         [id(14)] HRESULT FindFilesOrFolders() ;
  638.         [id(15)] HRESULT FindComputer() ;
  639.         [id(16)] HRESULT FindPrinter() ;
  640.         [id(17)] HRESULT FindPeople() ;
  641.         [id(18)] HRESULT GetSearchAssistantURL([in] VARIANT_BOOL bSubstitute, [in] VARIANT_BOOL bCustomize, [out, retval] BSTR *pbstrValue);
  642.         [id(19)] HRESULT NotifySearchSettingsChanged();
  643.         [propput, id(20)] HRESULT ASProvider([in] BSTR Provider);
  644.         [propget, id(20)] HRESULT ASProvider([out, retval] BSTR *pProvider);
  645.         [propput, id(21)] HRESULT ASSetting([in] int Setting);
  646.         [propget, id(21)] HRESULT ASSetting([out, retval] int *pSetting);
  647.         [id(22)] HRESULT NETDetectNextNavigate();
  648.         [id(23)] HRESULT PutFindText([in] BSTR FindText);
  649.         [propget, id(24)] HRESULT Version([out, retval] int *pVersion);
  650.         [id(25)] HRESULT EncodeString([in] BSTR bstrValue, [in] BSTR bstrCharSet, [in] VARIANT_BOOL bUseUTF8, [out, retval] BSTR *pbstrResult);
  651.     };
  652.     [
  653.         uuid(1611FDDA-445B-11d2-85DE-00C04FA35C89),
  654.         hidden
  655.     ]
  656.     dispinterface _SearchAssistantEvents
  657.     {
  658.         properties:
  659.         methods:
  660.             [id(1)] void OnNextMenuSelect([in] long idItem);
  661.             [id(2)] void OnNewSearch();
  662.     };
  663.     [
  664.         uuid(B45FF030-4447-11D2-85DE-00C04FA35C89),
  665.         helpstring("SearchAssistantOC Class"),
  666.         hidden
  667.     ]
  668.     coclass SearchAssistantOC
  669.     {
  670.         [default] interface ISearchAssistantOC;
  671.         [default, source] dispinterface _SearchAssistantEvents;
  672.     };
  673. };  // SHDocVw library