home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / exdisp.idl < prev    next >
Text File  |  1998-04-25  |  47KB  |  1,079 lines

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright 1995 - 1998 Microsoft Corporation. All Rights Reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7.  
  8. import "ocidl.idl";
  9. import "docobj.idl";
  10.  
  11. #include <olectl.h>
  12. #include "exdispid.h"
  13.  
  14. [
  15.     uuid(EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B), // LIBID_ShDocVw
  16.     helpstring("Microsoft Internet Controls"),
  17.     lcid(0x0000),
  18.     version(1.1)
  19. ]
  20. library SHDocVw {
  21.  
  22.     importlib("stdole2.tlb");
  23.  
  24.     [
  25.         uuid(EAB22AC1-30C1-11CF-A7EB-0000C05BAE0B), // IID_IWebBrowser
  26.         helpstring("Web Browser interface"),
  27.         helpcontext(0x0000),
  28.         hidden,
  29.         dual,
  30.         oleautomation,
  31.         odl
  32.     ]
  33.     interface IWebBrowser : IDispatch 
  34.     {
  35.         [id(100), helpstring("Navigates to the previous item in the history list."), helpcontext(0x0000)]
  36.         HRESULT GoBack();
  37.         [id(101), helpstring("Navigates to the next item in the history list."), helpcontext(0x0000)]
  38.         HRESULT GoForward();
  39.         [id(102), helpstring("Go home/start page."), helpcontext(0x0000)]
  40.         HRESULT GoHome();
  41.         [id(103), helpstring("Go Search Page."), helpcontext(0x0000)]
  42.         HRESULT GoSearch();
  43.  
  44.         [id(104), helpstring("Navigates to a URL or file."), helpcontext(0x0000)]
  45.         HRESULT Navigate([in] BSTR URL,
  46.                          [in, optional] VARIANT * Flags,
  47.                          [in, optional] VARIANT * TargetFrameName,
  48.                          [in, optional] VARIANT * PostData,
  49.                          [in, optional] VARIANT * Headers);
  50.         typedef
  51.         [
  52.             uuid(14EE5380-A378-11cf-A731-00A0C9082637),
  53.             helpstring("Constants for WebBrowser navigation flags")
  54.         ]
  55.         enum BrowserNavConstants {
  56.             [helpstring("Open in new window")]          navOpenInNewWindow = 0x0001,
  57.             [helpstring("Exclude from history list")]   navNoHistory = 0x0002,
  58.             [helpstring("Don't read from cache")]       navNoReadFromCache = 0x0004,
  59.             [helpstring("Don't write from cache")]      navNoWriteToCache = 0x0008,
  60.             [helpstring("Try other sites on failure")]  navAllowAutosearch = 0x0010,
  61.             [helpstring("OpenBrowserBar")]              navBrowserBar = 0x0020,
  62.         } BrowserNavConstants;
  63.  
  64.         [id(DISPID_REFRESH), helpstring("Refresh the currently viewed page."), helpcontext(0x0000)]
  65.         HRESULT Refresh();
  66.  
  67.         // The standard Refresh takes no parameters and we need some... use a new name
  68.         [id(105), helpstring("Refresh the currently viewed page."), helpcontext(0x0000)]
  69.         HRESULT Refresh2([in,optional] VARIANT * Level);
  70.  
  71.         typedef
  72.         [
  73.             uuid(C317C261-A991-11cf-A731-00A0C9082637),
  74.             helpstring("Constants for Refresh")
  75.         ]
  76.         enum RefreshConstants {                                         // must map to these in sdk\inc\docobj.h
  77.             [helpstring("Refresh normal")]     REFRESH_NORMAL     = 0,  //== OLECMDIDF_REFRESH_NORMAL
  78.             [helpstring("Refresh if expired")] REFRESH_IFEXPIRED  = 1,  //== OLECMDIDF_REFRESH_IFEXPIRED
  79.             [helpstring("Refresh completely")] REFRESH_COMPLETELY = 3   //== OLECMDIDF_REFRESH_COMPLETELY
  80.         } RefreshConstants;
  81.  
  82.         [id(106), helpstring("Stops opening a file."), helpcontext(0x0000)]
  83.         HRESULT Stop();
  84.  
  85.         // Automation heirarchy...
  86.         [id(200), propget, helpstring("Returns the application automation object if accessible, this automation object otherwise.."), helpcontext(0x0000)]
  87.         HRESULT Application([out,retval] IDispatch** ppDisp);
  88.  
  89.         [id(201), propget, helpstring("Returns the automation object of the container/parent if one exists or this automation object."), helpcontext(0x0000)]
  90.         HRESULT Parent([out,retval] IDispatch** ppDisp);
  91.  
  92.         [id(202), propget, helpstring("Returns the container/parent automation object, if any."), helpcontext(0x0000)]
  93.         HRESULT Container([out,retval] IDispatch** ppDisp);
  94.  
  95.         [id(203), propget, helpstring("Returns the active Document automation object, if any."), helpcontext(0x0000)]
  96.         HRESULT Document([out,retval] IDispatch** ppDisp);
  97.  
  98.         [id(204), propget, helpstring("Returns True if this is the top level object."), helpcontext(0x0000)]
  99.         HRESULT TopLevelContainer([out, retval] VARIANT_BOOL* pBool);
  100.  
  101.         [id(205), propget, helpstring("Returns the type of the contained document object."), helpcontext(0x0000)]
  102.         HRESULT Type([out,retval] BSTR* Type);
  103.  
  104.         // Window stuff...
  105.         [id(206), propget, helpstring("The horizontal position (pixels) of the frame window relative to the screen/container."), helpcontext(0x0000)]
  106.         HRESULT Left([out, retval] long *pl);
  107.         [id(206), propput]
  108.         HRESULT Left([in] long Left);
  109.         [id(207), propget, helpstring("The vertical position (pixels) of the frame window relative to the screen/container."), helpcontext(0x0000)]
  110.         HRESULT Top([out, retval] long *pl);
  111.         [id(207), propput]
  112.         HRESULT Top([in] long Top);
  113.         [id(208), propget, helpstring("The horizontal dimension (pixels) of the frame window/object."), helpcontext(0x0000)]
  114.         HRESULT Width([out, retval] long *pl);
  115.         [id(208), propput]
  116.         HRESULT Width([in] long Width);
  117.         [id(209), propget, helpstring("The vertical dimension (pixels) of the frame window/object."), helpcontext(0x0000)]
  118.         HRESULT Height([out, retval] long *pl);
  119.         [id(209), propput]
  120.         HRESULT Height([in] long Height);
  121.  
  122.         // WebBrowser stuff...
  123.         [id(210), propget, helpstring("Gets the short (UI-friendly) name of the URL/file currently viewed."), helpcontext(0x0000)]
  124.         HRESULT LocationName([out,retval] BSTR *LocationName);
  125.  
  126.         [id(211), propget, helpstring("Gets the full URL/path currently viewed."), helpcontext(0x0000)]
  127.         HRESULT LocationURL([out,retval] BSTR * LocationURL);
  128.  
  129.         // Added a property to see if the viewer is currenly busy or not...
  130.         [id(212), propget, helpstring("Query to see if something is still in progress."), helpcontext(0x0000)]
  131.         HRESULT Busy([out,retval] VARIANT_BOOL *pBool);
  132.     }
  133.  
  134.     [
  135.         uuid(EAB22AC2-30C1-11CF-A7EB-0000C05BAE0B), // DIID_DWebBrowserEvents
  136.         helpstring("Web Browser Control Events (old)"),
  137.         hidden
  138.     ]
  139.     dispinterface DWebBrowserEvents
  140.     {
  141.         properties:
  142.         methods:
  143.         [id(DISPID_BEFORENAVIGATE), helpstring("Fired when a new hyperlink is being navigated to."), helpcontext(0x0000)]
  144.         void BeforeNavigate([in] BSTR URL, long Flags, BSTR TargetFrameName, VARIANT * PostData, BSTR Headers, [in, out]VARIANT_BOOL * Cancel);
  145.  
  146.         [id(DISPID_NAVIGATECOMPLETE), helpstring("Fired when the document being navigated to becomes visible and enters the navigation stack."), helpcontext(0x0000)]
  147.         void NavigateComplete([in] BSTR URL );
  148.  
  149.         [id(DISPID_STATUSTEXTCHANGE), helpstring("Statusbar text changed."), helpcontext(0x0000)]
  150.         void StatusTextChange([in]BSTR Text);
  151.  
  152.         [id(DISPID_PROGRESSCHANGE), helpstring("Fired when download progress is updated."), helpcontext(0x0000)]
  153.         void ProgressChange([in] long Progress, [in] long ProgressMax);
  154.  
  155.         [id(DISPID_DOWNLOADCOMPLETE), helpstring("Download of page complete."), helpcontext(0x0000)]
  156.         void DownloadComplete();
  157.  
  158.         [id(DISPID_COMMANDSTATECHANGE), helpstring("The enabled state of a command changed"), helpcontext(0x0000)]
  159.         void CommandStateChange([in] long Command, [in] VARIANT_BOOL Enable);
  160.  
  161.         [id(DISPID_DOWNLOADBEGIN), helpstring("Download of a page started."), helpcontext(0x000)]
  162.         void DownloadBegin();
  163.  
  164.         [id(DISPID_NEWWINDOW), helpstring("Fired when a new window should be created."), helpcontext(0x0000)]
  165.         void NewWindow([in] BSTR URL, [in] long Flags, [in] BSTR TargetFrameName, [in] VARIANT * PostData, [in] BSTR Headers, [in,out] VARIANT_BOOL * Processed);
  166.  
  167.         [id(DISPID_TITLECHANGE), helpstring("Document title changed."), helpcontext(0x0000)]
  168.         void TitleChange([in]BSTR Text);
  169.  
  170.         [id(DISPID_FRAMEBEFORENAVIGATE), helpstring("Fired when a new hyperlink is being navigated to in a frame."), helpcontext(0x0000)]
  171.         void FrameBeforeNavigate([in] BSTR URL, long Flags, BSTR TargetFrameName, VARIANT * PostData, BSTR Headers, [in, out]VARIANT_BOOL * Cancel);
  172.  
  173.         [id(DISPID_FRAMENAVIGATECOMPLETE), helpstring("Fired when a new hyperlink is being navigated to in a frame."), helpcontext(0x0000)]
  174.         void FrameNavigateComplete([in] BSTR URL );
  175.  
  176.         [id(DISPID_FRAMENEWWINDOW), helpstring("Fired when a new window should be created."), helpcontext(0x0000)]
  177.         void FrameNewWindow([in] BSTR URL, [in] long Flags, [in] BSTR TargetFrameName, [in] VARIANT * PostData, [in] BSTR Headers, [in,out] VARIANT_BOOL * Processed);
  178.  
  179.         // The following are IWebBrowserApp specific:
  180.         //
  181.         [id(DISPID_QUIT), helpstring("Fired when application is quiting."), helpcontext(0x0000)]
  182.         void Quit([in, out] VARIANT_BOOL * Cancel);
  183.  
  184.         [id(DISPID_WINDOWMOVE), helpstring("Fired when window has been moved."), helpcontext(0x0000)]
  185.         void WindowMove();
  186.  
  187.         [id(DISPID_WINDOWRESIZE), helpstring("Fired when window has been sized."), helpcontext(0x0000)]
  188.         void WindowResize();
  189.  
  190.         [id(DISPID_WINDOWACTIVATE), helpstring("Fired when window has been activated."), helpcontext(0x0000)]
  191.         void WindowActivate();
  192.  
  193.         [id(DISPID_PROPERTYCHANGE), helpstring("Fired when the PutProperty method has been called."), helpcontext(0x0000)]
  194.         void PropertyChange([in] BSTR Property);
  195.     }
  196.  
  197.     typedef
  198.     [
  199.         uuid(34A226E0-DF30-11CF-89A9-00A0C9054129),
  200.         helpstring("Constants for WebBrowser CommandStateChange")
  201.     ]
  202.     enum CommandStateChangeConstants {
  203.         [helpstring("Command Change")]      CSC_UPDATECOMMANDS  = 0xFFFFFFFF,
  204.         [helpstring("Navigate Forward")]    CSC_NAVIGATEFORWARD = 0x00000001,
  205.         [helpstring("Navigate Back")]       CSC_NAVIGATEBACK    = 0x00000002,
  206.     } CommandStateChangeConstants;
  207.  
  208.     [
  209.         uuid(0002DF05-0000-0000-C000-000000000046), // IID_IWebBrowserApp
  210.         helpstring("Web Browser Application Interface."),
  211.         helpcontext(0x0000),
  212.         hidden,
  213.         oleautomation,
  214.         dual
  215.     ]
  216.     interface IWebBrowserApp : IWebBrowser
  217.     {
  218.         [id(300), helpstring("Exits application and closes the open document."), helpcontext(0x0000)]
  219.         HRESULT Quit();
  220.  
  221.         [id(301), helpstring("Converts client sizes into window sizes."), helpcontext(0x0000)]
  222.         HRESULT ClientToWindow([in,out] int* pcx, [in,out] int* pcy);
  223.  
  224.         [id(302), helpstring("Associates vtValue with the name szProperty in the context of the object."), helpcontext(0x0000)]
  225.         HRESULT PutProperty([in] BSTR Property, [in] VARIANT vtValue);
  226.  
  227.         [id(303), helpstring("Retrieve the Associated value for the property vtValue in the context of the object."), helpcontext(0x0000)]
  228.         HRESULT GetProperty([in] BSTR Property, [out, retval] VARIANT *pvtValue);
  229.  
  230.         [id(0), propget, helpstring("Returns name of the application."), helpcontext(0x0000)]
  231.         HRESULT Name([out,retval] BSTR* Name);
  232.  
  233.         [id(DISPID_HWND), propget, helpstring("Returns the HWND of the current IE window."), helpcontext(0x0000)]
  234.         HRESULT HWND([out,retval] long *pHWND);
  235.  
  236.         [id(400), propget, helpstring("Returns file specification of the application, including path."), helpcontext(0x0000)]
  237.         HRESULT FullName([out,retval] BSTR* FullName);
  238.  
  239.         [id(401), propget, helpstring("Returns the path to the application."), helpcontext(0x0000)]
  240.         HRESULT Path([out,retval] BSTR* Path);
  241.  
  242.         [id(402), propget, helpstring("Determines whether the application is visible or hidden."), helpcontext(0x0000)]
  243.         HRESULT Visible([out, retval] VARIANT_BOOL* pBool);
  244.         [id(402), propput, helpstring("Determines whether the application is visible or hidden."), helpcontext(0x0000)]
  245.         HRESULT Visible([in] VARIANT_BOOL Value);
  246.  
  247.         [id(403), propget, helpstring("Turn on or off the statusbar."), helpcontext(0x0000)]
  248.         HRESULT StatusBar([out, retval] VARIANT_BOOL* pBool);
  249.         [id(403), propput, helpstring("Turn on or off the statusbar."), helpcontext(0x0000)]
  250.         HRESULT StatusBar([in] VARIANT_BOOL Value);
  251.  
  252.         [id(404), propget, helpstring("Text of Status window."), helpcontext(0x0000)]
  253.         HRESULT StatusText([out, retval] BSTR *StatusText);
  254.         [id(404), propput, helpstring("Text of Status window."), helpcontext(0x0000)]
  255.         HRESULT StatusText([in] BSTR StatusText);
  256.  
  257.         [id(405), propget, helpstring("Controls which toolbar is shown."), helpcontext(0x0000)]
  258.         HRESULT ToolBar([out, retval] int * Value);
  259.         [id(405), propput, helpstring("Controls which toolbar is shown."), helpcontext(0x0000)]
  260.         HRESULT ToolBar([in] int Value);
  261.  
  262.         [id(406), propget, helpstring("Controls whether menubar is shown."), helpcontext(0x0000)]
  263.         HRESULT MenuBar([out, retval] VARIANT_BOOL * Value);
  264.         [id(406), propput, helpstring("Controls whether menubar is shown."), helpcontext(0x0000)]
  265.         HRESULT MenuBar([in] VARIANT_BOOL Value);
  266.  
  267.         [id(407), propget, helpstring("Maximizes window and turns off statusbar, toolbar, menubar, and titlebar."), helpcontext(0x0000)]
  268.         HRESULT FullScreen([out, retval] VARIANT_BOOL * pbFullScreen);
  269.         [id(407), propput, helpstring("Maximizes window and turns off statusbar, toolbar, menubar, and titlebar."), helpcontext(0x0000)]
  270.         HRESULT FullScreen([in] VARIANT_BOOL bFullScreen);
  271.     }
  272.  
  273.     [
  274.         uuid(D30C1661-CDAF-11d0-8A3E-00C04FC9E26E), // IID_IWebBrowser2
  275.         helpstring("Web Browser Interface for IE4."),
  276.         helpcontext(0x0000),
  277.         hidden,
  278.         oleautomation,
  279.         dual
  280.     ]
  281.     interface IWebBrowser2 : IWebBrowserApp
  282.     {
  283.         [id(500), helpstring("Navigates to a URL or file or pidl."), helpcontext(0x0000)]
  284.         HRESULT Navigate2([in] VARIANT * URL,
  285.                           [in, optional] VARIANT * Flags,
  286.                           [in, optional] VARIANT * TargetFrameName,
  287.                           [in, optional] VARIANT * PostData,
  288.                           [in, optional] VARIANT * Headers);
  289.  
  290.  
  291.         [id(501), helpstring("IOleCommandTarget::QueryStatus"), helpcontext(0x0000)]
  292.         HRESULT QueryStatusWB([in] OLECMDID cmdID, [out, retval] OLECMDF * pcmdf);
  293.         [id(502), helpstring("IOleCommandTarget::Exec"), helpcontext(0x0000)]
  294.         HRESULT ExecWB([in] OLECMDID cmdID, [in] OLECMDEXECOPT cmdexecopt, [in, optional] VARIANT * pvaIn, [out, in, optional] VARIANT * pvaOut);
  295.         [id(503), helpstring("Set BrowserBar to Clsid"), helpcontext(0x0000)]
  296.         HRESULT ShowBrowserBar( [in] VARIANT * pvaClsid,
  297.                                 [in, optional] VARIANT * pvarShow,
  298.                                 [in, optional] VARIANT * pvarSize );
  299.  
  300.         [id(DISPID_READYSTATE), propget, bindable]
  301.         HRESULT ReadyState([retval, out] READYSTATE * plReadyState);
  302.  
  303.         [id(550), propget, helpstring("Controls if the frame is offline (read from cache)"), helpcontext(0x0000)]
  304.         HRESULT Offline([out, retval] VARIANT_BOOL * pbOffline);
  305.         [id(550), propput, helpstring("Controls if the frame is offline (read from cache)"), helpcontext(0x0000)]
  306.         HRESULT Offline([in] VARIANT_BOOL bOffline);
  307.  
  308.         [id(551), propget, helpstring("Controls if any dialog boxes can be shown"), helpcontext(0x0000)]
  309.         HRESULT Silent([out, retval] VARIANT_BOOL * pbSilent);
  310.         [id(551), propput, helpstring("Controls if any dialog boxes can be shown"), helpcontext(0x0000)]
  311.         HRESULT Silent([in] VARIANT_BOOL bSilent);
  312.  
  313.         [id(552), propget, helpstring("Registers OC as a top-level browser (for target name resolution)"), helpcontext(0x0000)]
  314.         HRESULT RegisterAsBrowser([out, retval] VARIANT_BOOL * pbRegister);
  315.         [id(552), propput, helpstring("Registers OC as a top-level browser (for target name resolution)"), helpcontext(0x0000)]
  316.         HRESULT RegisterAsBrowser([in] VARIANT_BOOL bRegister);
  317.  
  318.         [id(553), propget, helpstring("Registers OC as a drop target for navigation"), helpcontext(0x0000)]
  319.         HRESULT RegisterAsDropTarget([out, retval] VARIANT_BOOL * pbRegister);
  320.         [id(553), propput, helpstring("Registers OC as a drop target for navigation"), helpcontext(0x0000)]
  321.         HRESULT RegisterAsDropTarget([in] VARIANT_BOOL bRegister);
  322.  
  323.         [id(554), propget, helpstring("Controls if the browser is in theater mode"), helpcontext(0x0000)]
  324.         HRESULT TheaterMode([out, retval] VARIANT_BOOL * pbRegister);
  325.         [id(554), propput, helpstring("Controls if the browser is in theater mode"), helpcontext(0x0000)]
  326.         HRESULT TheaterMode([in] VARIANT_BOOL bRegister);
  327.  
  328.         [id(555), propget, helpstring("Controls whether address bar is shown"), helpcontext(0x0000)]
  329.         HRESULT AddressBar([out, retval] VARIANT_BOOL * Value);
  330.         [id(555), propput, helpstring("Controls whether address bar is shown"), helpcontext(0x0000)]
  331.         HRESULT AddressBar([in] VARIANT_BOOL Value);
  332.  
  333.         [id(556), propget, helpstring("Controls whether the window is resizable"), helpcontext(0x0000)]
  334.         HRESULT Resizable([out, retval] VARIANT_BOOL * Value);
  335.         [id(556), propput, helpstring("Controls whether the window is resizable"), helpcontext(0x0000)]
  336.         HRESULT Resizable([in] VARIANT_BOOL Value);
  337.     }
  338.  
  339.     [
  340.         uuid(34A715A0-6587-11D0-924A-0020AFC7AC4D), // IID_DWebBrowserEvents2
  341.         helpstring("Web Browser Control events interface"),
  342.         hidden
  343.     ]
  344.     dispinterface DWebBrowserEvents2
  345.     {
  346.         properties:
  347.         methods:
  348.         [id(DISPID_STATUSTEXTCHANGE), helpstring("Statusbar text changed."), helpcontext(0x0000)]
  349.         void StatusTextChange([in]BSTR Text);
  350.  
  351.         [id(DISPID_PROGRESSCHANGE), helpstring("Fired when download progress is updated."), helpcontext(0x0000)]
  352.         void ProgressChange([in] long Progress, [in] long ProgressMax);
  353.  
  354.         [id(DISPID_COMMANDSTATECHANGE), helpstring("The enabled state of a command changed."), helpcontext(0x0000)]
  355.         void CommandStateChange([in] long Command, [in] VARIANT_BOOL Enable);
  356.  
  357.         [id(DISPID_DOWNLOADBEGIN), helpstring("Download of a page started."), helpcontext(0x000)]
  358.         void DownloadBegin();
  359.  
  360.         [id(DISPID_DOWNLOADCOMPLETE), helpstring("Download of page complete."), helpcontext(0x0000)]
  361.         void DownloadComplete();
  362.  
  363.         [id(DISPID_TITLECHANGE), helpstring("Document title changed."), helpcontext(0x0000)]
  364.         void TitleChange([in] BSTR Text);
  365.  
  366.         [id(DISPID_PROPERTYCHANGE), helpstring("Fired when the PutProperty method has been called."), helpcontext(0x0000)]
  367.         void PropertyChange([in] BSTR szProperty);
  368.  
  369.         // New events for IE40:
  370.         //
  371.         [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)]
  372.         void BeforeNavigate2([in] IDispatch* pDisp,
  373.                              [in] VARIANT * URL, [in] VARIANT * Flags, [in] VARIANT * TargetFrameName, [in] VARIANT * PostData, [in] VARIANT * Headers,
  374.                              [in,out] VARIANT_BOOL * Cancel);
  375.  
  376.         [id(DISPID_NEWWINDOW2), helpstring("A new, hidden, non-navigated WebBrowser window is needed."), helpcontext(0x0000)]
  377.         void NewWindow2([in, out] IDispatch** ppDisp, [in, out] VARIANT_BOOL * Cancel);
  378.  
  379.         [id(DISPID_NAVIGATECOMPLETE2), helpstring("Fired when the document being navigated to becomes visible and enters the navigation stack."), helpcontext(0x0000)]
  380.         void NavigateComplete2([in] IDispatch* pDisp, [in] VARIANT * URL );
  381.  
  382.         [id(DISPID_DOCUMENTCOMPLETE), helpstring("Fired when the document being navigated to reaches ReadyState_Complete."), helpcontext(0x0000)]
  383.         void DocumentComplete([in] IDispatch* pDisp, [in] VARIANT * URL );
  384.  
  385.         [id(DISPID_ONQUIT), helpstring("Fired when application is quiting."), helpcontext(0x0000)]
  386.         void OnQuit();
  387.  
  388.         [id(DISPID_ONVISIBLE), helpstring("Fired when the window should be shown/hidden"), helpcontext(0x0000)]
  389.         void OnVisible([in] VARIANT_BOOL Visible);
  390.  
  391.         [id(DISPID_ONTOOLBAR), helpstring("Fired when the toolbar  should be shown/hidden"), helpcontext(0x0000)]
  392.         void OnToolBar([in] VARIANT_BOOL ToolBar);
  393.  
  394.         [id(DISPID_ONMENUBAR), helpstring("Fired when the menubar should be shown/hidden"), helpcontext(0x0000)]
  395.         void OnMenuBar([in] VARIANT_BOOL MenuBar);
  396.  
  397.         [id(DISPID_ONSTATUSBAR), helpstring("Fired when the statusbar should be shown/hidden"), helpcontext(0x0000)]
  398.         void OnStatusBar([in] VARIANT_BOOL StatusBar);
  399.  
  400.         [id(DISPID_ONFULLSCREEN), helpstring("Fired when fullscreen mode should be on/off"), helpcontext(0x0000)]
  401.         void OnFullScreen([in] VARIANT_BOOL FullScreen);
  402.  
  403.         [id(DISPID_ONTHEATERMODE), helpstring("Fired when theater mode should be on/off"), helpcontext(0x0000)]
  404.         void OnTheaterMode([in] VARIANT_BOOL TheaterMode);
  405.     }
  406.  
  407.     [
  408.         uuid(EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B), // v.1 clsid CLSID_WebBrowser_V1
  409.         control,
  410.         helpstring("WebBrowser Control")
  411.     ]
  412.     coclass WebBrowser_V1 
  413.     {
  414.                           interface     IWebBrowser2;
  415.         [default]         interface     IWebBrowser;
  416.         [source]          dispinterface DWebBrowserEvents2;
  417.         [default, source] dispinterface DWebBrowserEvents;
  418.     }
  419.  
  420.     [
  421.         uuid(8856F961-340A-11D0-A96B-00C04FD705A2), // v.2 clsid CLSID_WebBrowser
  422.         control,
  423.         helpstring("WebBrowser Control")
  424.     ]
  425.     coclass WebBrowser 
  426.     {
  427.         [default]         interface     IWebBrowser2;
  428.                           interface     IWebBrowser;
  429.         [default, source] dispinterface DWebBrowserEvents2;
  430.         [source]          dispinterface DWebBrowserEvents;
  431.     }
  432.  
  433.     [
  434.         uuid(0002DF01-0000-0000-C000-000000000046), // CLSID_InternetExplorer
  435.         helpstring("Internet Explorer Application."),
  436.     ]
  437.     coclass InternetExplorer
  438.     {
  439.         [default]         interface     IWebBrowser2;
  440.                           interface     IWebBrowserApp;
  441.         [default, source] dispinterface DWebBrowserEvents2;
  442.         [source]          dispinterface DWebBrowserEvents;
  443.     }
  444.  
  445.     [
  446.         uuid(9BA05970-F6A8-11CF-A442-00A0C90A8F39), // IID_IFolderViewOC
  447.         helpstring("Folder View Events Forwarder Object"),
  448.         helpcontext(0x0000),
  449.         hidden,
  450.         oleautomation,
  451.         dual,
  452.         odl
  453.     ]
  454.     interface IFolderViewOC : IDispatch
  455.     {
  456.         [helpstring("Set the ShellFolderView object to monitor events of."), helpcontext(0x0000)]
  457.         HRESULT SetFolderView([in] IDispatch *pdisp);
  458.     }
  459.  
  460.     [
  461.         uuid(62112AA2-EBE4-11cf-A5FB-0020AFE7292D), // IID_DShellFolderViewEvents
  462.         helpstring("Event interface for ShellFolderView"),
  463.     ]
  464.     dispinterface DShellFolderViewEvents
  465.     {
  466.         properties:
  467.         methods:
  468.         [id(DISPID_SELECTIONCHANGED), helpstring("The Selection in the view changed."), helpcontext(0x0000)]
  469.         void SelectionChanged();
  470.     }
  471.  
  472.     [
  473.         uuid(9BA05971-F6A8-11CF-A442-00A0C90A8F39), // CLSID_ShellFolderViewOC
  474.         helpstring("Shell Folder View Events Router."),
  475.         hidden
  476.     ]
  477.     coclass ShellFolderViewOC
  478.     {
  479.         [default]         interface     IFolderViewOC;
  480.         [default, source] dispinterface DShellFolderViewEvents;
  481.     }
  482.     
  483.     typedef
  484.     [
  485.         uuid(F41E6981-28E5-11d0-82B4-00A0C90C29C5),
  486.         helpstring("Constants for ShellWindows registration")
  487.     ]
  488.     enum ShellWindowTypeConstants {
  489.         [helpstring("Explorer")]                    SWC_EXPLORER    = 0x0,
  490.         [helpstring("Various Browsing Windows")]    SWC_BROWSER     = 0x00000001,
  491.         [helpstring("3rd Party Browsers")]          SWC_3RDPARTY    = 0x00000002,
  492.         [helpstring("Creation Callback")]           SWC_CALLBACK    = 0x00000004,
  493.     } ShellWindowTypeConstants;
  494.  
  495.     typedef
  496.     [
  497.         uuid(7716a370-38ca-11d0-a48b-00a0c90a8f39),
  498.         helpstring("Options for ShellWindows FindWindow"),
  499.         hidden
  500.     ]
  501.     enum ShellWindowFindWindowOptions {
  502.         [helpstring("Need Dispatch")]           SWFO_NEEDDISPATCH   = 0x00000001,
  503.         [helpstring("Include Pending")]         SWFO_INCLUDEPENDING = 0x00000002,
  504.         [helpstring("Cookie Passed")]           SWFO_COOKIEPASSED   = 0x00000004,
  505.     } ShellWindowFindWindowOptions;
  506.  
  507.     [
  508.         uuid(fe4106e0-399a-11d0-a48c-00a0c90a8f39), // DIID_DShellWindowsEvents
  509.         helpstring("Event interface for IShellWindows"),
  510.     ]
  511.     dispinterface DShellWindowsEvents
  512.     {
  513.         properties:
  514.         methods:
  515.         [id(DISPID_WINDOWREGISTERED), helpstring("A new window was registered."), helpcontext(0x0000)]
  516.         void WindowRegistered([in] long lCookie);
  517.  
  518.         [id(DISPID_WINDOWREVOKED), helpstring("A new window was revoked."), helpcontext(0x0000)]
  519.         void WindowRevoked([in] long lCookie);
  520.     }
  521.  
  522.     [
  523.         uuid(85CB6900-4D95-11CF-960C-0080C7F4EE85),     // IID_IShellWindows
  524.         helpstring("Definition of interface IShellWindows"), 
  525.         oleautomation,
  526.         dual,
  527.         odl,
  528.     ]
  529.     interface IShellWindows : IDispatch
  530.     {
  531.         //Properties
  532.         [propget, helpstring("Get count of open Shell windows")]
  533.         HRESULT Count([out, retval] long *Count);
  534.  
  535.         //Methods
  536.         [id(0), helpstring("Return the shell window for the given index")]
  537.         HRESULT Item([in,optional] VARIANT index, [out, retval]IDispatch **Folder);
  538.  
  539.         [id(-4), helpstring("Enumerates the figures")]
  540.         HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  541.  
  542.         // Some private hidden members to allow shell windows to add and
  543.         // remove themself from the list.  We mark them hidden to keep
  544.         // random VB apps from trying to Register...
  545.         [helpstring("Register a window with the list"), hidden]
  546.         HRESULT Register([in] IDispatch *pid,
  547.                          [in] long hwnd,
  548.                          [in] int swClass,
  549.                          [out]long *plCookie);
  550.  
  551.         [helpstring("Register a pending open with the list"), hidden]
  552.         HRESULT RegisterPending([in] long lThreadId,
  553.                          [in] VARIANT* pvarloc,     // will hold pidl that is being opened.
  554.                          [in] VARIANT* pvarlocRoot, // Optional root pidl
  555.                          [in] int swClass,
  556.                          [out]long *plCookie);
  557.  
  558.         [helpstring("Remove a window from the list"), hidden]
  559.         HRESULT Revoke([in]long lCookie);
  560.         // As an optimization, each window notifies the new location
  561.         // only when
  562.         //  (1) it's being deactivated
  563.         //  (2) getFullName is called (we overload it to force update)
  564.         [helpstring("Notifies the new location"), hidden]
  565.         HRESULT OnNavigate([in]long lCookie, [in] VARIANT* pvarLoc);
  566.         [helpstring("Notifies the activation"), hidden]
  567.         HRESULT OnActivated([in]long lCookie, [in] VARIANT_BOOL fActive);
  568.         [helpstring("Find the window based on the location"), hidden]
  569.         HRESULT FindWindow([in] VARIANT* pvarLoc,
  570.                            [in] VARIANT* pvarLocRoot,
  571.                            [in] int swClass,
  572.                            [out] long * phwnd,
  573.                            [in] int swfwOptions,
  574.                            [out,retval] IDispatch** ppdispOut);
  575.         [helpstring("Notifies on creation and frame name set"), hidden]
  576.         HRESULT OnCreated([in]long lCookie,[in] IUnknown *punk);
  577.  
  578.         [helpstring("Used by IExplore to register different processes"), hidden]
  579.         HRESULT ProcessAttachDetach([in] VARIANT_BOOL fAttach);
  580.     }
  581.  
  582.     [
  583.         uuid(9BA05972-F6A8-11CF-A442-00A0C90A8F39),     // CLSID_ShellWindows
  584.         helpstring("ShellDispatch Load in Shell Context")
  585.     ]
  586.     coclass ShellWindows
  587.     {
  588.         [default] interface IShellWindows;
  589.         [default, source] dispinterface DShellWindowsEvents;
  590.     }
  591.  
  592.     [
  593.         uuid(88A05C00-F000-11CE-8350-444553540000), // IID_IShellLinkDual
  594.         helpstring("Definition of Shell Link IDispatch interface"), 
  595.         oleautomation,
  596.         dual,
  597.         odl,
  598.         hidden,
  599.     ]
  600.     interface IShellLinkDual : IDispatch
  601.     {
  602.         [propget, helpstring("Get the path of the link")]
  603.         HRESULT Path([out, retval] BSTR *pbs);
  604.  
  605.         [propput, helpstring("Set the path of the link")]
  606.         HRESULT Path([in] BSTR bs);
  607.  
  608.         [propget, helpstring("Get the description for the link")]
  609.         HRESULT Description([out, retval] BSTR *pbs);
  610.  
  611.         [propput, helpstring("Set the description for the link")]
  612.         HRESULT Description([in] BSTR bs);
  613.  
  614.         [propget, helpstring("Get the working directory for the link")]
  615.         HRESULT WorkingDirectory([out, retval] BSTR *pbs);
  616.  
  617.         [propput, helpstring("Set the working directory for the link")]
  618.         HRESULT WorkingDirectory([in] BSTR bs);
  619.  
  620.         [propget, helpstring("Get the arguments for the link")]
  621.         HRESULT Arguments([out, retval] BSTR *pbs);
  622.  
  623.         [propput, helpstring("Set the arguments for the link")]
  624.         HRESULT Arguments([in] BSTR bs);
  625.  
  626.  
  627.         [propget, helpstring("Get the Hotkey for the link")]
  628.         HRESULT Hotkey([out, retval] int *piHK);
  629.  
  630.         [propput, helpstring("Set the Hotkey for the link")]
  631.         HRESULT Hotkey([in] int iHK);
  632.  
  633.         [propget, helpstring("Get the Show Command for the link")]
  634.         HRESULT ShowCommand([out, retval] int *piShowCommand);
  635.  
  636.         [propput, helpstring("Set the Show Command for the link")]
  637.         HRESULT ShowCommand([in] int iShowCommand);
  638.  
  639.         // STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
  640.         //Methods
  641.         [helpstring("Tell the link to resolve itself")]
  642.         HRESULT Resolve([in] int fFlags);
  643.  
  644.         [helpstring("Get the IconLocation for the link")]
  645.         HRESULT GetIconLocation([out] BSTR *pbs, [out,retval] int *piIcon);
  646.  
  647.         [helpstring("Set the IconLocation for the link")]
  648.         HRESULT SetIconLocation([in] BSTR bs, [in] int iIcon);
  649.  
  650.         [helpstring("Tell the link to save the changes")]
  651.         HRESULT Save ([in, optional] VARIANT vWhere);
  652.     }
  653.  
  654.     [
  655.         uuid(11219420-1768-11d1-95BE-00609797EA4F), // CLSID_ShellLinkObject
  656.         helpstring("Shell Link object")
  657.     ]
  658.     coclass ShellLinkObject // funny name so we don't conflict with CLSID_ShellLink
  659.     {
  660.         [default] interface IShellLinkDual;
  661.     }
  662.  
  663.     [
  664.         uuid(08EC3E00-50B0-11CF-960C-0080C7F4EE85), // IID_FolderItemVerb
  665.         helpstring("Definition of interface FolderItemVerb"), 
  666.         oleautomation,
  667.         dual,
  668.         odl, 
  669.     ]
  670.     interface FolderItemVerb : IDispatch
  671.     {
  672.         [propget, helpstring("Get Application object")]
  673.         HRESULT Application ([out, retval] IDispatch **ppid);
  674.  
  675.         [propget, helpstring("Get Parent object")]
  676.         HRESULT Parent([out, retval] IDispatch **ppid);
  677.  
  678.         [id(0), propget, helpstring("Get display name for item")]
  679.         HRESULT Name([out, retval] BSTR *pbs);
  680.  
  681.         [helpstring("Execute the verb")]
  682.         HRESULT DoIt();
  683.     }
  684.  
  685.     [
  686.         uuid(1F8352C0-50B0-11CF-960C-0080C7F4EE85), // IID_FolderItemVerbs
  687.         helpstring("Definition of interface FolderItemVerbs"), 
  688.         oleautomation,
  689.         dual,
  690.         odl, 
  691.     ]
  692.     interface FolderItemVerbs : IDispatch
  693.     {
  694.         //Properties
  695.         [propget, helpstring("Get count of open folder windows")]
  696.         HRESULT Count([out, retval] long *plCount);
  697.  
  698.         [propget, helpstring("Get Application object")]
  699.         HRESULT Application ([out, retval] IDispatch **ppid);
  700.  
  701.         [propget, helpstring("Get Parent object")]
  702.         HRESULT Parent([out, retval] IDispatch **ppid);
  703.  
  704.         //Methods
  705.         //Standard Methods
  706.         [helpstring("Return the specified verb")]
  707.         HRESULT Item([in,optional] VARIANT index, [out, retval]FolderItemVerb **ppid);
  708.  
  709.         [id(-4), helpstring("Enumerates the figures")]
  710.         HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  711.     }
  712.  
  713.     interface Folder;   // forward reference
  714.  
  715.     [
  716.         uuid(FAC32C80-CBE4-11CE-8350-444553540000), // IID_FolderItem
  717.         helpstring("Definition of interface FolderItem"), 
  718.         oleautomation,
  719.         dual,
  720.         odl, 
  721.     ]
  722.     interface FolderItem : IDispatch
  723.     {
  724.         [propget, helpstring("Get Application object")]
  725.         HRESULT Application ([out, retval] IDispatch **ppid);
  726.  
  727.         [propget, helpstring("Get Parent object")]
  728.         HRESULT Parent([out, retval] IDispatch **ppid);
  729.  
  730.         [id(0), propget, helpstring("Get display name for item")]
  731.         HRESULT Name([out, retval] BSTR *pbs);
  732.  
  733.         [id(0), propput, helpstring("Set the name for the item")]
  734.         HRESULT Name([in] BSTR bs);
  735.  
  736.         [propget, helpstring("Get the pathname to the item")]
  737.         HRESULT Path([out, retval]BSTR *pbs);
  738.  
  739.         [propget, helpstring("If item is link return link object")]
  740.         HRESULT GetLink([out, retval] IDispatch **ppid);
  741.  
  742.         [propget, helpstring("If item is a folder return folder object")]
  743.         HRESULT GetFolder([out, retval] IDispatch **ppid);
  744.  
  745.         [propget, helpstring("Is the item a link?")]
  746.         HRESULT IsLink([out, retval] VARIANT_BOOL *pb);
  747.  
  748.         [propget, helpstring("Is the item a Folder?")]
  749.         HRESULT IsFolder([out, retval] VARIANT_BOOL *pb);
  750.  
  751.         [propget, helpstring("Is the item a file system object?")]
  752.         HRESULT IsFileSystem([out, retval] VARIANT_BOOL *pb);
  753.  
  754.         [propget, helpstring("Is the item browsable?")]
  755.         HRESULT IsBrowsable([out, retval] VARIANT_BOOL *pb);
  756.  
  757.         [propget, helpstring("Modification Date?")]
  758.         HRESULT ModifyDate([out, retval] DATE *pdt);
  759.  
  760.         [propput, helpstring("Modification Date?")]
  761.         HRESULT ModifyDate([in] DATE dt);
  762.  
  763.         [propget, helpstring("Size")]
  764.         HRESULT Size([out, retval] LONG *pul);
  765.  
  766.         [propget, helpstring("Type")]
  767.         HRESULT Type([out, retval] BSTR *pbs);
  768.  
  769.         [helpstring("Get the list of verbs for the object")]
  770.         HRESULT Verbs([out, retval] FolderItemVerbs **ppfic);
  771.  
  772.         [helpstring("Execute a command on the item")]
  773.         HRESULT InvokeVerb([in,optional] VARIANT vVerb);
  774.     }
  775.  
  776.     [
  777.         uuid(744129E0-CBE5-11CE-8350-444553540000), // IID_FolderItems
  778.         helpstring("Definition of interface FolderItems"), 
  779.         oleautomation,
  780.         dual,
  781.         odl, 
  782.     ]
  783.     interface FolderItems : IDispatch
  784.     {
  785.         //Properties
  786.         [propget, helpstring("Get count of items in the folder")]
  787.         HRESULT Count([out, retval] long *plCount);
  788.  
  789.         [propget, helpstring("Get Application object")]
  790.         HRESULT Application ([out, retval] IDispatch **ppid);
  791.  
  792.         [propget, helpstring("Get Parent object")]
  793.         HRESULT Parent([out, retval] IDispatch **ppid);
  794.  
  795.         //Methods
  796.         //Standard Methods
  797.         [helpstring("Return the figure for the given index")]
  798.         HRESULT Item([in,optional] VARIANT index, [out, retval]FolderItem **ppid);
  799.  
  800.         [id(-4), helpstring("Enumerates the figures")]
  801.         HRESULT _NewEnum([out, retval] IUnknown **ppunk);
  802.     }
  803.  
  804.     [
  805.         uuid(BBCBDE60-C3FF-11CE-8350-444553540000), // IID_Folder
  806.         helpstring("Definition of interface Folder"), 
  807.         oleautomation,
  808.         dual,
  809.         odl, 
  810.     ]
  811.     interface Folder : IDispatch
  812.     {
  813.         //Properties
  814.         [id(0), propget, helpstring("Get the display name for the window")]
  815.         HRESULT Title([out, retval] BSTR *pbs);
  816.  
  817.         [propget, helpstring("Get Application object")]
  818.         HRESULT Application ([out, retval] IDispatch **ppid);
  819.  
  820.         [propget, helpstring("Get Parent object")]
  821.         HRESULT Parent([out, retval] IDispatch **ppid);
  822.  
  823.         [propget, helpstring("Get Parent object")]
  824.         HRESULT ParentFolder([out, retval] Folder **ppsf);
  825.  
  826.         //Methods
  827.         [helpstring("The collection of Items in folder")]
  828.         HRESULT Items([out, retval] FolderItems **ppid);
  829.  
  830.         [helpstring("Parse the name to get an item.")]
  831.         HRESULT ParseName([in] BSTR bName, [out, retval] FolderItem **ppid);
  832.  
  833.         [helpstring("Create a new sub folder in this folder.")]
  834.         HRESULT NewFolder([in] BSTR bName, [in, optional] VARIANT vOptions);
  835.  
  836.         [helpstring("Move Items to this folder.")]
  837.         HRESULT MoveHere([in] VARIANT vItem, [in, optional] VARIANT vOptions);
  838.  
  839.         [helpstring("Copy Items to this folder.")]
  840.         HRESULT CopyHere([in] VARIANT vItem, [in, optional] VARIANT vOptions);
  841.  
  842.         [helpstring("Get the details about an item.")]
  843.         HRESULT GetDetailsOf([in] VARIANT vItem, [in] int iColumn, [out, retval]BSTR *pbs);
  844.     }
  845.  
  846.     [
  847.         uuid(E7A1AF80-4D96-11CF-960C-0080C7F4EE85), // IID_IShellFolderViewDual
  848.         helpstring("definition of interface IShellFolderViewDual"), 
  849.         oleautomation,
  850.         hidden, 
  851.         dual,
  852.         odl, 
  853.     ]
  854.     interface IShellFolderViewDual : IDispatch
  855.     {
  856.         [propget, helpstring("Get Application object")]
  857.         HRESULT Application([out, retval] IDispatch **ppid);
  858.  
  859.         [propget, helpstring("Get Parent object")]
  860.         HRESULT Parent([out, retval] IDispatch **ppid);
  861.  
  862.         [propget, helpstring("Get the folder being viewed")]
  863.         HRESULT Folder([out, retval] Folder **ppid);
  864.  
  865.         [helpstring("The collection of Selected Items in folder")]
  866.         HRESULT SelectedItems([out, retval] FolderItems **ppid);
  867.  
  868.         [propget, helpstring("The currently focused item in the folder")]
  869.         HRESULT FocusedItem([out, retval] FolderItem **ppid);
  870.  
  871.         [helpstring("Select the item")]
  872.         HRESULT SelectItem([in]VARIANT *pvfi, [in] int dwFlags);
  873.  
  874.         [helpstring("Show items menu and return command selected")]
  875.         HRESULT PopupItemMenu([in]FolderItem *pfi, [in, optional]VARIANT vx, [in, optional]VARIANT vy, [out, retval] BSTR *pbs);
  876.  
  877.         [propget, helpstring("Returns the scripting automation model."), helpcontext(0x0000)]
  878.         HRESULT Script([out,retval] IDispatch** ppDisp);
  879.  
  880.         [propget, helpstring("Returns the view options for showing a folder."), helpcontext(0x0000)]
  881.         HRESULT ViewOptions([out,retval] long * plViewOptions);
  882.     }
  883.  
  884.     [
  885.         uuid(62112AA1-EBE4-11cf-A5FB-0020AFE7292D),  // CLSID_ShellFolderView
  886.         helpstring("Shell Folder View Object")
  887.     ]
  888.     coclass ShellFolderView
  889.     {
  890.         [default] interface IShellFolderViewDual;
  891.         [source,default] dispinterface DShellFolderViewEvents;
  892.     }
  893.  
  894.     typedef
  895.     [
  896.         uuid(742A99A0-C77E-11D0-A32C-00A0C91EEDBA),
  897.         helpstring("Constants for ViewOptions")
  898.     ]
  899.     enum ShellFolderViewOptions {
  900.         [helpstring("Show All Objects")]                        SFVVO_SHOWALLOBJECTS = 0x00000001,
  901.         [helpstring("Show File Extensions")]                    SFVVO_SHOWEXTENSIONS = 0x00000002,
  902.         [helpstring("Color encode Compressed files")]           SFVVO_SHOWCOMPCOLOR = 0x00000008,
  903.         [helpstring("Show System Files")]                       SFVVO_SHOWSYSFILES = 0x00000020,
  904.         [helpstring("Use Windows 95 UI settings")]              SFVVO_WIN95CLASSIC = 0x00000040,
  905.         [helpstring("User needs to double click in web View")]  SFVVO_DOUBLECLICKINWEBVIEW = 0x00000080,
  906.         [helpstring("Is Desktop HTML enabled")]                 SFVVO_DESKTOPHTML = 0x00000200,
  907.     } ShellFolderViewOptions;
  908.  
  909.     [
  910.         uuid(D8F015C0-C278-11CE-A49E-444553540000), // IID_IShellDispatch
  911.         helpstring("Definition of interface IShellDispatch"), 
  912.         oleautomation,
  913.         hidden, 
  914.         dual,
  915.         odl, 
  916.     ]
  917.     interface IShellDispatch : IDispatch
  918.     {
  919.         [propget, helpstring("Get Application object")]
  920.         HRESULT Application ([out, retval] IDispatch **ppid);
  921.  
  922.         [propget, helpstring("Get Parent object")]
  923.         HRESULT Parent([out, retval] IDispatch **ppid);
  924.  
  925.         //=========================================================
  926.         // Name Space methods and properties
  927.  
  928.         [helpstring("Enum the contents of a folder")]
  929.         HRESULT NameSpace([in] VARIANT vDir, [out, retval] Folder **ppsdf);
  930.  
  931.         [helpstring("Browse the name space for a Folder")]
  932.         HRESULT BrowseForFolder([in] long Hwnd,
  933.             [in] BSTR Title,
  934.             [in] long Options,
  935.             [in,optional] VARIANT RootFolder,
  936.             [out, retval] FOLDER **ppsdf);
  937.  
  938.         [helpstring("The collection of open folder windows")]
  939.         HRESULT Windows([out, retval] IDispatch **ppid);
  940.  
  941.         [helpstring("Open a folder")]
  942.         HRESULT Open([in] VARIANT vDir);
  943.  
  944.         [helpstring("Explore a folder")]
  945.         HRESULT Explore([in] VARIANT vDir);
  946.  
  947.         [helpstring("Minimize all windows")]
  948.         HRESULT MinimizeAll(void);
  949.  
  950.         [helpstring("Undo Minimize All")]
  951.         HRESULT UndoMinimizeALL(void);
  952.  
  953.         [helpstring("Bring up the file run")]
  954.         HRESULT FileRun(void);
  955.  
  956.         [helpstring("Cascade Windows")]
  957.         HRESULT CascadeWindows(void);
  958.  
  959.         [helpstring("Tile windows vertically")]
  960.         HRESULT TileVertically(void);
  961.  
  962.         [helpstring("Tile windows horizontally")]
  963.         HRESULT TileHorizontally(void);
  964.  
  965.         [helpstring("Exit Windows")]
  966.         HRESULT ShutdownWindows(void);
  967.  
  968.         [helpstring("Suspend the pc")]
  969.         HRESULT Suspend(void);
  970.  
  971.         [helpstring("Eject the pc")]
  972.         HRESULT EjectPC(void);
  973.  
  974.         [helpstring("Bring up the Set time dialog")]
  975.         HRESULT SetTime(void);
  976.  
  977.         [helpstring("Handle Tray properties")]
  978.         HRESULT TrayProperties(void);
  979.  
  980.         [helpstring("Display shell help")]
  981.         HRESULT Help(void);
  982.  
  983.         [helpstring("Find Files")]
  984.         HRESULT FindFiles(void);
  985.  
  986.         [helpstring("Find a computer")]
  987.         HRESULT FindComputer(void);
  988.  
  989.         [helpstring("Refresh the menu")]
  990.         HRESULT RefreshMenu(void);
  991.  
  992.         [helpstring("Run a controlpanelItem")]
  993.         HRESULT ControlPanelItem([in] BSTR szDir);
  994.     }
  995.  
  996.     [
  997.         uuid(13709620-C279-11CE-A49E-444553540000), // CLSID_Shell
  998.         helpstring("Shell Object Type Information")
  999.     ]
  1000.     coclass Shell
  1001.     {
  1002.         [default] interface IShellDispatch;
  1003.     }
  1004.  
  1005.     [
  1006.         uuid(0A89A860-D7B1-11CE-8350-444553540000), // CLSID_ShellDispatchInproc
  1007.         helpstring("ShellDispatch Load in Shell Context"),
  1008.         hidden
  1009.     ]
  1010.     coclass ShellDispatchInproc
  1011.     {
  1012.         interface IUnknown;
  1013.     }
  1014.  
  1015.     [
  1016.         uuid(1820FED0-473E-11D0-A96C-00C04FD705A2),     // CLSID_WebViewFolderContents
  1017.         hidden
  1018.     ]
  1019.     coclass WebViewFolderContents
  1020.     {
  1021.         [default] interface IShellFolderViewDual;
  1022.         [source,default] dispinterface DShellFolderViewEvents;
  1023.     }
  1024.  
  1025.     typedef
  1026.     [
  1027.         uuid(CA31EA20-48D0-11CF-8350-444553540000),
  1028.         helpstring("Constants for Special Folders for open/Explore")
  1029.     ]
  1030.     enum ShellSpecialFolderConstants    {
  1031.         [helpstring("Special Folder DESKTOP")]      ssfDESKTOP = 0x0000,
  1032.         [helpstring("Special Folder PROGRAMS")]     ssfPROGRAMS = 0x0002,
  1033.         [helpstring("Special Folder CONTROLS")]     ssfCONTROLS = 0x0003,
  1034.         [helpstring("Special Folder PRINTERS")]     ssfPRINTERS = 0x0004,
  1035.         [helpstring("Special Folder PERSONAL")]     ssfPERSONAL = 0x0005,
  1036.         [helpstring("Special Folder FAVORITES")]    ssfFAVORITES = 0x0006,
  1037.         [helpstring("Special Folder STARTUP")]      ssfSTARTUP = 0x0007,
  1038.         [helpstring("Special Folder RECENT")]       ssfRECENT = 0x0008,
  1039.         [helpstring("Special Folder SENDTO")]       ssfSENDTO = 0x0009,
  1040.         [helpstring("Special Folder BITBUCKET")]    ssfBITBUCKET = 0x000a,
  1041.         [helpstring("Special Folder STARTMENU")]    ssfSTARTMENU = 0x000b,
  1042.         [helpstring("Special Folder DESKTOPDIRECTORY")]    ssfDESKTOPDIRECTORY = 0x0010,
  1043.         [helpstring("Special Folder DRIVES")]       ssfDRIVES = 0x0011,
  1044.         [helpstring("Special Folder NETWORK")]      ssfNETWORK = 0x0012,
  1045.         [helpstring("Special Folder NETHOOD")]      ssfNETHOOD = 0x0013,
  1046.         [helpstring("Special Folder FONTS")]        ssfFONTS = 0x0014,
  1047.         [helpstring("Special Folder TEMPLATES")]    ssfTEMPLATES = 0x0015,
  1048.     } ShellSpecialFolderConstants;
  1049.  
  1050.     [
  1051.         uuid(729FE2F8-1EA8-11d1-8F85-00C04FC2FBE1),     // IID_IShellUIHelper
  1052.         helpstring("Shell UI Helper Control Interface"), 
  1053.         oleautomation, dual
  1054.     ]
  1055.     interface IShellUIHelper : IDispatch
  1056.     {
  1057.         [hidden, id(DISPID_RESETFIRSTBOOTMODE)] HRESULT ResetFirstBootMode();
  1058.         [hidden, id(DISPID_RESETSAFEMODE)] HRESULT ResetSafeMode();
  1059.         [hidden, id(DISPID_REFRESHOFFLINEDESKTOP)] HRESULT RefreshOfflineDesktop();
  1060.         [id(DISPID_ADDFAVORITE)] HRESULT AddFavorite([in] BSTR URL, [optional, in] VARIANT *Title);
  1061.         [id(DISPID_ADDCHANNEL)] HRESULT AddChannel([in] BSTR URL);
  1062.         [id(DISPID_ADDDESKTOPCOMPONENT)] HRESULT AddDesktopComponent([in] BSTR URL, [in] BSTR Type, 
  1063.             [optional, in] VARIANT *Left,
  1064.             [optional, in] VARIANT *Top,
  1065.             [optional, in] VARIANT *Width,
  1066.             [optional, in] VARIANT *Height);
  1067.         [id(DISPID_ISSUBSCRIBED)] HRESULT IsSubscribed([in] BSTR URL, [out,retval] VARIANT_BOOL* pBool);
  1068.     }
  1069.     [
  1070.         uuid(64AB4BB7-111E-11d1-8F79-00C04FC2FBE1)  // CLSID_ShellUIHelper
  1071.     ]
  1072.     coclass ShellUIHelper
  1073.     {
  1074.         [default] interface IShellUIHelper;
  1075.     }
  1076.  
  1077. };  // SHDocVw library
  1078.  
  1079.