home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 October / Chip_2002-10_cd1.bin / zkuste / vbasic / Data / Utils / WMP71SDK.exe / wmp.idl < prev    next >
Encoding:
Text File  |  2001-09-26  |  50.3 KB  |  904 lines

  1. //*****************************************************************************
  2. //
  3. // Microsoft Windows Media Player
  4. // Copyright (C) Microsoft Corporation, 2000-2001
  5. //
  6. // FileName:            wmp.idl
  7. //
  8. // Abstract:            Interface definitions for Windows Media Player
  9. //
  10. //*****************************************************************************
  11. #include <olectl.h>
  12. #include "wmpids.h"
  13.  
  14. import "oaidl.idl";
  15. import "ocidl.idl";
  16.  
  17.  
  18. //////////////////////////////////////////////////////////////////////
  19. //            PUBLIC ENUM TYPES 
  20. //////////////////////////////////////////////////////////////////////
  21.  
  22. typedef
  23. [
  24.     helpstring( "State of opening process" ),
  25.     public
  26. ]
  27. enum WMPOpenState // wmpos
  28. {
  29.     [ helpstring( "Undefined" ) ]                                   wmposUndefined,
  30.     [ helpstring( "New Playlist is about to be loaded" ) ]          wmposPlaylistChanging,
  31.     [ helpstring( "Locating the playlist" ) ]                       wmposPlaylistLocating,
  32.     [ helpstring( "Connecting to the server holding a playlist" ) ] wmposPlaylistConnecting,
  33.     [ helpstring( "Loading a playlist" ) ]                          wmposPlaylistLoading,
  34.     [ helpstring( "Opening a playlist" ) ]                          wmposPlaylistOpening,
  35.     [ helpstring( "Playlist is open" ) ]                            wmposPlaylistOpenNoMedia,
  36.     [ helpstring( "Playlist has changed" ) ]                        wmposPlaylistChanged,
  37.     [ helpstring( "New media is about to be loaded" ) ]             wmposMediaChanging,
  38.     [ helpstring( "Locating the media" ) ]                          wmposMediaLocating,
  39.     [ helpstring( "Connecting to the server holding media" ) ]      wmposMediaConnecting,
  40.     [ helpstring( "Loading media" ) ]                               wmposMediaLoading,
  41.     [ helpstring( "Opening a media" ) ]                             wmposMediaOpening,
  42.     [ helpstring( "Media is open" ) ]                               wmposMediaOpen,
  43.     [ helpstring( "Starting codec acquisition" ) ]                  wmposBeginCodecAcquisition,
  44.     [ helpstring( "End codec acquisition" ) ]                       wmposEndCodecAcquisition,
  45.     [ helpstring( "Starting license acquisition" ) ]                wmposBeginLicenseAcquisition,
  46.     [ helpstring( "End license acquisition" ) ]                     wmposEndLicenseAcquisition,
  47.     [ helpstring( "Starting individualization" ) ]                  wmposBeginIndividualization,
  48.     [ helpstring( "End individualization" ) ]                       wmposEndIndividualization,
  49.     [ helpstring( "Waiting for media" ) ]                           wmposMediaWaiting,    
  50.     [ helpstring( "Opening an URL whose type is not known" ) ]      wmposOpeningUnknownURL,    
  51. } WMPOpenState;
  52.  
  53. typedef
  54. [
  55.     helpstring( "State of playback" ),
  56.     public
  57. ]
  58. enum WMPPlayState
  59. {
  60.     [ helpstring( "State is undefined" ) ]                      wmppsUndefined,
  61.     [ helpstring( "Playback is stopped" ) ]                     wmppsStopped,
  62.     [ helpstring( "Playback is paused" ) ]                      wmppsPaused,
  63.     [ helpstring( "Stream is playing" ) ]                       wmppsPlaying,
  64.     [ helpstring( "Stream is Scanning forward" ) ]              wmppsScanForward,
  65.     [ helpstring( "Stream is Scanning in reverse" ) ]           wmppsScanReverse,
  66.     [ helpstring( "Media is being buffered" ) ]                 wmppsBuffering,
  67.     [ helpstring( "Waiting for streaming data" ) ]              wmppsWaiting,
  68.     [ helpstring( "End of media reached" ) ]                    wmppsMediaEnded,
  69.     [ helpstring( "Preparing new media" ) ]                     wmppsTransitioning,
  70.     [ helpstring( "Ready to begin playing" ) ]                  wmppsReady,
  71. } WMPPlayState;
  72.  
  73.  
  74. typedef
  75. [
  76.     helpstring("WMP Playlist Change Event Type"),
  77.     public
  78. ]
  79. enum WMPPlaylistChangeEventType
  80. {
  81.     [ helpstring( "Unknown" ) ]     wmplcUnknown = 0,
  82.     [ helpstring( "Clear" ) ]       wmplcClear,
  83.     [ helpstring( "InfoChange" ) ]  wmplcInfoChange,
  84.     [ helpstring( "Move" ) ]        wmplcMove,
  85.     [ helpstring( "Delete" ) ]      wmplcDelete,
  86.     [ helpstring( "Insert" ) ]      wmplcInsert,
  87.     [ helpstring( "Append" ) ]      wmplcAppend,
  88.     [ helpstring( "Private" ) ]     wmplcPrivate,
  89.     [ helpstring( "NameChange" ) ]  wmplcNameChange,
  90.     [ helpstring( "Morph" ) ]       wmplcMorph
  91. } WMPPlaylistChangeEventType;
  92.  
  93.  
  94.  
  95. //////////////////////////////////////////////////////////////////////
  96. //                  Forward interface declarations
  97. //////////////////////////////////////////////////////////////////////
  98.  
  99. interface IWMPPlaylist;
  100.  
  101.  
  102. //////////////////////////////////////////////////////////////////////
  103. //                   PUBLIC INTERFACES
  104. //////////////////////////////////////////////////////////////////////
  105.  
  106.  
  107. //////////////////////////////////////////////////////////////////////
  108. //          Error Interfaces
  109. //////////////////////////////////////////////////////////////////////
  110.  
  111. [
  112.     object,
  113.     uuid(3614C646-3B3B-4de7-A81E-930E3F2127B3),
  114.     dual,
  115.     helpstring("IWMPErrorItem interface"),
  116.     pointer_default(unique)
  117. ]
  118. interface IWMPErrorItem : IDispatch
  119. {
  120.     [ id(DISPID_WMPERRORITEM_ERRORCODE), propget, helpstring("Returns the error code") ]
  121.         HRESULT errorCode( [out, retval] long * phr );
  122.     [ id(DISPID_WMPERRORITEM_ERRORDESCRIPTION), propget, helpstring("Returns a description of the error") ]
  123.         HRESULT errorDescription( [out, retval] BSTR * pbstrDescription );
  124.     [ id(DISPID_WMPERRORITEM_ERRORCONTEXT), propget, helpstring("Returns context information for the error") ]
  125.         HRESULT errorContext( [out, retval] VARIANT * pvarContext );
  126.     [ id(DISPID_WMPERRORITEM_REMEDY), propget, helpstring("Returns remedy code for the error") ]
  127.         HRESULT remedy( [out, retval] long * plRemedy );
  128.     [ id(DISPID_WMPERRORITEM_CUSTOMURL), propget, helpstring("Returns a custom url for this error (if avail)") ]
  129.         HRESULT customUrl( [out, retval] BSTR * pbstrCustomUrl );
  130. }
  131.  
  132. [
  133.     object,
  134.     uuid(A12DCF7D-14AB-4c1b-A8CD-63909F06025B),
  135.     dual,
  136.     helpstring("IWMPError Interface"),
  137.     pointer_default(unique)
  138. ]
  139. interface IWMPError : IDispatch
  140. {
  141.     [ id(DISPID_WMPERROR_CLEARERRORQUEUE), helpstring("Clears the error queue") ]
  142.         HRESULT clearErrorQueue();
  143.     [ id(DISPID_WMPERROR_ERRORCOUNT), propget, helpstring("Returns the number of error items") ]
  144.         HRESULT errorCount( [out, retval] DWORD * pdwNumErrors );
  145.     [ id(DISPID_WMPERROR_ITEM), propget, helpstring("Returns an error item object") ]
  146.         HRESULT item( [in] DWORD dwIndex, [out, retval] IWMPErrorItem ** ppErrorItem );
  147.     [ id(DISPID_WMPERROR_WEBHELP), helpstring("Launches WebHelp") ]
  148.         HRESULT webHelp();
  149. }
  150.  
  151. //////////////////////////////////////////////////////////////////////
  152. //          Media Interfaces
  153. //////////////////////////////////////////////////////////////////////
  154.  
  155. [
  156.     object,
  157.     uuid(94D55E95-3FAC-11d3-B155-00C04F79FAA6),
  158.     dual,
  159.     helpstring("IWMPMedia Interface"),
  160.     pointer_default(unique)
  161. ]
  162. interface IWMPMedia : IDispatch
  163. {
  164.     [ id( DISPID_WMPMEDIA_ISIDENTICAL ), propget, helpstring( "Determines if the supplied object is the same as the this one" ) ]
  165.         HRESULT isIdentical([in] IWMPMedia *pIWMPMedia, [out, retval] VARIANT_BOOL *pvbool );
  166.     [ id( DISPID_WMPMEDIA_SOURCEURL ), propget, helpstring( "Returns the media URL" ) ]
  167.         HRESULT sourceURL( [out, retval] BSTR *pbstrSourceURL );
  168.     [ id( DISPID_WMPMEDIA_NAME ), propget, helpstring( "Returns the name of the media" ) ]
  169.         HRESULT name( [out, retval] BSTR *pbstrName);
  170.     [ id( DISPID_WMPMEDIA_NAME ), propput, helpstring( "Sets the name of the media" ) ]
  171.         HRESULT name( [in] BSTR bstrName);
  172.     [ id( DISPID_WMPMEDIA_IMAGESOURCEWIDTH ), propget, helpstring( "Returns the original width of the source images" ) ]
  173.         HRESULT imageSourceWidth( [out, retval] long *pWidth );
  174.     [ id( DISPID_WMPMEDIA_IMAGESOURCEHEIGHT ), propget, helpstring( "Returns the original height of the source images" ) ]
  175.         HRESULT imageSourceHeight( [out, retval] long *pHeight );
  176.     [ id( DISPID_WMPMEDIA_MARKERCOUNT ), propget, helpstring( "Returns the number of markers in the file" ) ]
  177.         HRESULT markerCount( [out, retval] long *pMarkerCount );
  178.     [ id( DISPID_WMPMEDIA_GETMARKERTIME ), helpstring( "Returns the time of a marker" ) ]
  179.         HRESULT getMarkerTime( [in] long MarkerNum, [out, retval] double *pMarkerTime );
  180.     [ id( DISPID_WMPMEDIA_GETMARKERNAME ), helpstring( "Returns the name of a marker" ) ]
  181.         HRESULT getMarkerName( [in] long MarkerNum, [out, retval] BSTR *pbstrMarkerName );
  182.     [ id( DISPID_WMPMEDIA_DURATION ), propget, helpstring( "Returns duration of current media" ) ]
  183.         HRESULT duration( [out, retval] double * pDuration );
  184.     [ id( DISPID_WMPMEDIA_DURATIONSTRING ), propget, helpstring( "Returns duration of current media as a string" ) ]
  185.         HRESULT durationString( [out, retval] BSTR * pbstrDuration );
  186.     [ id( DISPID_WMPMEDIA_ATTRIBUTECOUNT ), propget, helpstring( "Returns the count of the attributes associated with this media" ) ]
  187.         HRESULT attributeCount( [out, retval] long *plCount );
  188.     [ id( DISPID_WMPMEDIA_GETATTRIBUTENAME ), helpstring( "Returns the name of the attribute whose index has been specified" ) ]
  189.         HRESULT getAttributeName( [in] long lIndex, [out, retval] BSTR *pbstrItemName );
  190.     [ id( DISPID_WMPMEDIA_GETITEMINFO ), helpstring( "Returns the value of specified attribute for this media" ) ]
  191.         HRESULT getItemInfo( [in] BSTR bstrItemName, [out, retval] BSTR *pbstrVal );
  192.     [ id( DISPID_WMPMEDIA_SETITEMINFO ), helpstring( "Sets the value of specified attribute for this media" ) ]
  193.         HRESULT setItemInfo( [in] BSTR bstrItemName, [in] BSTR bstrVal );
  194.     [ id( DISPID_WMPMEDIA_GETITEMINFOBYATOM ), helpstring( "Gets an item info by atom" ) ]
  195.         HRESULT getItemInfoByAtom( [in] long lAtom, [out, retval] BSTR* pbstrVal );
  196.     [ id( DISPID_WMPMEDIA_ISMEMBEROF ), helpstring( "Is the media a member of the given playlist" ) ]
  197.         HRESULT isMemberOf( [in] IWMPPlaylist* pPlaylist, [out, retval] VARIANT_BOOL* pvarfIsMemberOf );
  198.     [ id( DISPID_WMPMEDIA_ISREADONLYITEM ), helpstring( "Is the attribute read only" ) ]
  199.         HRESULT isReadOnlyItem( [in] BSTR bstrItemName, [out, retval] VARIANT_BOOL* pvarfIsReadOnly);
  200. }    
  201.  
  202. //////////////////////////////////////////////////////////////////////
  203. //          Control Interfaces
  204. //////////////////////////////////////////////////////////////////////
  205.  
  206. [
  207.     object,
  208.     uuid(74C09E02-F828-11d2-A74B-00A0C905F36E),
  209.     dual,
  210.     helpstring("IWMPControls Interface"),
  211.     pointer_default(unique)
  212. ]
  213. interface IWMPControls : IDispatch
  214. {
  215.     [ id( DISPID_WMPCONTROLS_ISAVAILABLE ), propget, helpstring( "Returns whether or not the specified media functionality is available" ) ]
  216.         HRESULT isAvailable( [in] BSTR bstrItem, [out, retval] VARIANT_BOOL *pIsAvailable );
  217.     [ id( DISPID_WMPCONTROLS_PLAY ),helpstring( "Begins playing media" ) ]
  218.         HRESULT play();
  219.     [ id( DISPID_WMPCONTROLS_STOP ),helpstring( "Stops play of media" ) ]
  220.         HRESULT stop();
  221.     [ id( DISPID_WMPCONTROLS_PAUSE ), helpstring( "Pauses play of media" ) ]
  222.         HRESULT pause();
  223.     [ id( DISPID_WMPCONTROLS_FASTFORWARD ), helpstring( "Fast play of media in forward direction" ) ]
  224.         HRESULT fastForward();
  225.     [ id( DISPID_WMPCONTROLS_FASTREVERSE ),helpstring( "Fast play of media in reverse direction" ) ]
  226.         HRESULT fastReverse();
  227.     [ id( DISPID_WMPCONTROLS_CURRENTPOSITION ), propget, helpstring( "Returns the current position in media" ) ]
  228.         HRESULT currentPosition( [out, retval] double * pdCurrentPosition );
  229.     [ id( DISPID_WMPCONTROLS_CURRENTPOSITION ), propput, helpstring( "sets the current position in media" ) ]
  230.         HRESULT currentPosition( [in] double dCurrentPosition );
  231.     [ id( DISPID_WMPCONTROLS_CURRENTPOSITIONSTRING ), propget, helpstring( "Returns the current position in media as a string" ) ]
  232.         HRESULT currentPositionString( [out, retval] BSTR * pbstrCurrentPosition );
  233.     [ id( DISPID_WMPCONTROLS_NEXT ), helpstring( "Sets the current item to the next item in the playlist" ) ]
  234.         HRESULT next();
  235.     [ id( DISPID_WMPCONTROLS_PREVIOUS ), helpstring( "Sets the current item to the previous item in the playlist" ) ]
  236.         HRESULT previous();
  237.     [ id( DISPID_WMPCONTROLS_CURRENTITEM ), propget, helpstring( "Returns/Sets the play item" ) ]
  238.         HRESULT currentItem( [out, retval] IWMPMedia **ppIWMPMedia);
  239.     [ id( DISPID_WMPCONTROLS_CURRENTITEM ), propput ]
  240.         HRESULT currentItem( [in] IWMPMedia *pIWMPMedia );
  241.     [ id( DISPID_WMPCONTROLS_CURRENTMARKER ), propget, helpstring( "Returns the current marker" ) ]
  242.         HRESULT currentMarker( [out, retval] long *plMarker);
  243.     [ id( DISPID_WMPCONTROLS_CURRENTMARKER ), propput, helpstring( "Sets the current marker" ) ]
  244.         HRESULT currentMarker( [in] long lMarker);
  245.     [ id( DISPID_WMPCONTROLS_PLAYITEM ), helpstring( "Sets the current item and plays it" )]
  246.         HRESULT playItem( [in] IWMPMedia *pIWMPMedia );
  247. }
  248.  
  249. //////////////////////////////////////////////////////////////////////
  250. //          Settings Interfaces
  251. //////////////////////////////////////////////////////////////////////
  252.  
  253. [
  254.     object,
  255.     uuid(9104D1AB-80C9-4fed-ABF0-2E6417A6DF14),
  256.     dual,
  257.     helpstring("IWMPSettings Interface"),
  258.     pointer_default(unique)
  259. ]
  260. interface IWMPSettings : IDispatch
  261. {
  262.     [ id( DISPID_WMPSETTINGS_ISAVAILABLE ), propget, helpstring( "Returns whether or not the specified media functionality is available" ) ]
  263.         HRESULT isAvailable( [in] BSTR bstrItem, [out, retval] VARIANT_BOOL *pIsAvailable );
  264.     [ id( DISPID_WMPSETTINGS_AUTOSTART ), propget, helpstring( "Returns whether media should automatically begin playing" ) ]
  265.         HRESULT autoStart( [out, retval] VARIANT_BOOL *pfAutoStart );
  266.     [ id( DISPID_WMPSETTINGS_AUTOSTART ), propput, helpstring( "Sets whether media should automatically begin playing" ) ]
  267.         HRESULT autoStart( [in] VARIANT_BOOL fAutoStart );
  268.  
  269.     [ id( DISPID_WMPSETTINGS_BASEURL ), propget, helpstring( "Returns the base URL used for relative path resolution" ) ]
  270.         HRESULT baseURL( [out, retval] BSTR * pbstrBaseURL );
  271.     [ id( DISPID_WMPSETTINGS_BASEURL ), propput, helpstring( "Sets the base URL used for relative path resolution" ) ]
  272.         HRESULT baseURL( [in] BSTR bstrBaseURL );
  273.  
  274.     [ id( DISPID_WMPSETTINGS_DEFAULTFRAME ), propget, helpstring( "Returns the frame location that changes when a URL flip occurs" ) ]
  275.         HRESULT defaultFrame( [out, retval] BSTR * pbstrDefaultFrame );
  276.     [ id( DISPID_WMPSETTINGS_DEFAULTFRAME ), propput, helpstring( "Sets the frame location that changes when a URL flip occurs" ) ]
  277.         HRESULT defaultFrame( [in] BSTR bstrDefaultFrame );
  278.  
  279.     [ id( DISPID_WMPSETTINGS_INVOKEURLS ), propget, helpstring( "Returns whether URL events should spawn a browser." ) ]
  280.         HRESULT invokeURLs( [out, retval] VARIANT_BOOL *pfInvokeURLs );
  281.     [ id( DISPID_WMPSETTINGS_INVOKEURLS ), propput, helpstring( "Sets whether URL events should spawn a browser." ) ]
  282.         HRESULT invokeURLs( [in] VARIANT_BOOL fInvokeURLs );
  283.  
  284.     [ id( DISPID_WMPSETTINGS_MUTE ), propget, helpstring( "Returns whether audio should be muted." ) ]
  285.         HRESULT mute( [out, retval] VARIANT_BOOL *pfMute );
  286.     [ id( DISPID_WMPSETTINGS_MUTE ), propput, helpstring( "Sets audio mute." ) ]
  287.         HRESULT mute( [in] VARIANT_BOOL fMute );
  288.  
  289.     [ id( DISPID_WMPSETTINGS_PLAYCOUNT ), propget, helpstring( "Returns how many times media should play" ) ]
  290.         HRESULT playCount( [out, retval] long *plCount );
  291.     [ id( DISPID_WMPSETTINGS_PLAYCOUNT ), propput, helpstring( "Sets whether media should automatically begin playing" ) ]
  292.         HRESULT playCount( [in] long lCount );
  293.  
  294.     [ id( DISPID_WMPSETTINGS_RATE ), propget, helpstring( "Returns current playback rate" ) ]
  295.         HRESULT rate( [out, retval] double * pdRate );
  296.     [ id( DISPID_WMPSETTINGS_RATE ), propput, helpstring( "Sets current playback rate" ) ]
  297.         HRESULT rate( [in] double dRate );
  298.  
  299.     [ id( DISPID_WMPSETTINGS_BALANCE ), propget, helpstring( "Returns current audio Balance" ) ]
  300.         HRESULT balance( [out, retval] long * plBalance );
  301.     [ id( DISPID_WMPSETTINGS_BALANCE ), propput, helpstring( "Sets audio Balance" ) ]
  302.         HRESULT balance( [in] long lBalance );
  303.  
  304.     [ id( DISPID_WMPSETTINGS_VOLUME ), propget, helpstring( "Returns current audio volume" ) ]
  305.         HRESULT volume( [out, retval] long * plVolume );
  306.     [ id( DISPID_WMPSETTINGS_VOLUME ), propput, helpstring( "Sets audio volume" ) ]
  307.         HRESULT volume( [in] long lVolume );
  308.  
  309.     [ id( DISPID_WMPSETTINGS_GETMODE ), helpstring( "Returns the mode of the playlist" ) ]
  310.         HRESULT getMode(  [in] BSTR bstrMode, [out,retval] VARIANT_BOOL *pvarfMode );
  311.     [ id( DISPID_WMPSETTINGS_SETMODE ), helpstring( "Sets the mode of the playlist" )  ]
  312.         HRESULT setMode( [in] BSTR bstrMode, [in] VARIANT_BOOL varfMode );
  313.  
  314.     [ id( DISPID_WMPSETTINGS_ENABLEERRORDIALOGS ), propget, helpstring( "Returns whether error dialogs are shown by default when embedded" ) ]
  315.         HRESULT enableErrorDialogs( [out, retval] VARIANT_BOOL *pfEnableErrorDialogs );
  316.     [ id( DISPID_WMPSETTINGS_ENABLEERRORDIALOGS ), propput, helpstring( "Returns whether error dialogs are shown by default when embedded" ) ]
  317.         HRESULT enableErrorDialogs( [in] VARIANT_BOOL fEnableErrorDialogs );
  318.  
  319. }
  320.  
  321. //////////////////////////////////////////////////////////////////////
  322. //          ClosedCaption Interfaces
  323. //////////////////////////////////////////////////////////////////////
  324. [
  325.     object,
  326.     uuid(4F2DF574-C588-11d3-9ED0-00C04FB6E937),
  327.     dual,
  328.     helpstring("IWMPClosedCaption Interface"),
  329.     pointer_default(unique)
  330. ]
  331. interface IWMPClosedCaption : IDispatch
  332. {
  333.     [ id( DISPID_WMPCLOSEDCAPTION_SAMISTYLE ), propget, helpstring( "Returns the previously set SAMI style" ) ]
  334.         HRESULT SAMIStyle( [out, retval] BSTR * pbstrSAMIStyle );
  335.     [ id( DISPID_WMPCLOSEDCAPTION_SAMISTYLE ), propput, helpstring( "Sets the SAMI style" ) ]
  336.         HRESULT SAMIStyle( [in] BSTR  bstrSAMIStyle );
  337.  
  338.     [ id( DISPID_WMPCLOSEDCAPTION_SAMILANG ), propget, helpstring( "Returns the previously set SAMI language" ) ]
  339.         HRESULT SAMILang( [out, retval] BSTR * pbstrSAMILang );
  340.     [ id( DISPID_WMPCLOSEDCAPTION_SAMILANG ), propput, helpstring( "Sets the SAMI language" ) ]
  341.         HRESULT SAMILang( [in] BSTR  bstrSAMILang );
  342.  
  343.     [ id( DISPID_WMPCLOSEDCAPTION_SAMIFILENAME ), propget, helpstring( "Returns the previously set SAMI file name" ) ]
  344.         HRESULT SAMIFileName( [out, retval] BSTR * pbstrSAMIFileName );
  345.     [ id( DISPID_WMPCLOSEDCAPTION_SAMIFILENAME ), propput, helpstring( "Sets the SAMI file name" ) ]
  346.         HRESULT SAMIFileName( [in] BSTR  bstrSAMIFileName );
  347.  
  348.     [ id( DISPID_WMPCLOSEDCAPTION_CAPTIONINGID ), propget, helpstring( "Returns the previously set Captioning ID" ) ]
  349.         HRESULT captioningId( [out, retval] BSTR * pbstrCaptioningID );
  350.     [ id( DISPID_WMPCLOSEDCAPTION_CAPTIONINGID ), propput, helpstring( "Sets the Captioning ID" ) ]
  351.         HRESULT captioningId( [in] BSTR  bstrCaptioningID );
  352.  
  353. }
  354.  
  355. //////////////////////////////////////////////////////////////////////
  356. //          Playlist Interfaces
  357. //////////////////////////////////////////////////////////////////////
  358.  
  359. [
  360.     object,
  361.     uuid(D5F0F4F1-130C-11d3-B14E-00C04F79FAA6),
  362.     dual,
  363.     helpstring("IWMPPlaylist Interface"),
  364.     pointer_default(unique)
  365. ]
  366. interface IWMPPlaylist : IDispatch
  367. {
  368.     // properties
  369.     [ id( DISPID_WMPPLAYLIST_COUNT ), propget, helpstring( "Returns the number of items in the playlist" ) ]
  370.         HRESULT count( [out, retval] long *plCount );
  371.     [ id( DISPID_WMPPLAYLIST_NAME ), propget, helpstring( "Returns the name of the playlist" ) ]
  372.         HRESULT name( [out, retval] BSTR *pbstrName);
  373.     [ id( DISPID_WMPPLAYLIST_NAME ), propput, helpstring( "Sets the name of the playlist" ) ]
  374.         HRESULT name( [in] BSTR bstrName);
  375.     [ id( DISPID_WMPPLAYLIST_ATTRIBUTECOUNT ), propget, helpstring( "Returns the number of attributes associated with the playlist" ) ]
  376.         HRESULT attributeCount( [out, retval] long *plCount);
  377.     [ id( DISPID_WMPPLAYLIST_ATTRIBUTENAME ), propget, helpstring( "Returns the name of an attribute specified by an index") ]
  378.         HRESULT attributeName( [in] long lIndex, [out, retval] BSTR *pbstrAttributeName);
  379.     [ id( DISPID_WMPPLAYLIST_ITEM ), propget, helpstring( "Returns the item at the specified index" ) ]
  380.         HRESULT item( long lIndex, [out, retval] IWMPMedia **ppIWMPMedia );
  381.     [ id( DISPID_WMPPLAYLIST_GETITEMINFO ), helpstring( "Returns the value of a playlist attribute" ) ]
  382.         HRESULT getItemInfo( BSTR bstrName, [out, retval] BSTR *pbstrVal );
  383.     [ id( DISPID_WMPPLAYLIST_SETITEMINFO ), helpstring( "Sets the value of a playlist attribute" ) ]
  384.         HRESULT setItemInfo( [in] BSTR bstrName, [in] BSTR bstrValue );
  385.  
  386.     // methods
  387.     [ id( DISPID_WMPPLAYLIST_ISIDENTICAL ), propget, helpstring( "Determines if the supplied object is the same as the this one" ) ]
  388.         HRESULT isIdentical([in] IWMPPlaylist *pIWMPPlaylist, [out, retval] VARIANT_BOOL *pvbool );
  389.     [ id( DISPID_WMPPLAYLIST_CLEAR ), helpstring( "Removes all items from the playlist" ) ]
  390.         HRESULT clear();
  391.     [ id( DISPID_WMPPLAYLIST_INSERTITEM ), helpstring( "Inserts an item into the playlist at the specified location" ) ]
  392.         HRESULT insertItem( [in] long lIndex, [in] IWMPMedia *pIWMPMedia );
  393.     [ id( DISPID_WMPPLAYLIST_APPENDITEM ), helpstring( "Adds an item to the end of the playlist" ) ]
  394.         HRESULT appendItem( [in] IWMPMedia *pIWMPMedia );
  395.     [ id( DISPID_WMPPLAYLIST_REMOVEITEM ), helpstring( "Removes the specified item from the playlist" ) ]
  396.         HRESULT removeItem([in] IWMPMedia *pIWMPMedia );
  397.     [ id( DISPID_WMPPLAYLIST_MOVEITEM ), helpstring( "Changes the location of an item in the playlist" ) ]
  398.         HRESULT moveItem(long lIndexOld, long lIndexNew );
  399.  
  400. }
  401.  
  402.    
  403. //////////////////////////////////////////////////////////////////////
  404. //          CDROM Interfaces
  405. //////////////////////////////////////////////////////////////////////
  406.  
  407. [
  408.     object,
  409.     uuid(cfab6e98-8730-11d3-b388-00c04f68574b),
  410.     dual,
  411.     helpstring("IWMPCdrom Interface"),
  412.     pointer_default(unique)
  413. ]
  414. interface IWMPCdrom : IDispatch
  415. {
  416.     // properties
  417.     [ id( DISPID_WMPCDROM_DRIVESPECIFIER ), propget, helpstring( "Returns the CDROM drive specifier" ) ]
  418.         HRESULT driveSpecifier ([out, retval] BSTR* pbstrDrive);
  419.  
  420.     [ id( DISPID_WMPCDROM_PLAYLIST ), propget, helpstring( "Returns the playlist of tracks currently in the CDROM drive" ) ]
  421.         HRESULT playlist ([out, retval] IWMPPlaylist** ppPlaylist);
  422.  
  423.     // methods
  424.     [ id( DISPID_WMPCDROM_EJECT ), helpstring( "Eject the CD in the CDROM drive" ) ]
  425.         HRESULT eject ();
  426. }
  427.  
  428. [
  429.     object,
  430.     uuid(EE4C8FE2-34B2-11d3-A3BF-006097C9B344),
  431.     dual,
  432.     helpstring("IWMPCdromCollection Interface"),
  433.     pointer_default(unique)
  434. ]
  435. interface IWMPCdromCollection : IDispatch
  436. {
  437.     // properties
  438.     [ id( DISPID_WMPCDROMCOLLECTION_COUNT ), propget, helpstring( "Returns the number of items in the cdrom collection" ) ]
  439.         HRESULT count( [out, retval] long *plCount );
  440.  
  441.     // methods
  442.     [ id( DISPID_WMPCDROMCOLLECTION_ITEM ), helpstring( "Returns the CDROM object at the given index" ) ]
  443.         HRESULT item( [in] long lIndex, [out, retval] IWMPCdrom **ppItem );
  444.  
  445.     [ id( DISPID_WMPCDROMCOLLECTION_GETBYDRIVESPECIFIER ), helpstring( "Returns the CDROM object associated with a particular drive specifier, e.g. F:" ) ]
  446.         HRESULT getByDriveSpecifier( [in] BSTR bstrDriveSpecifier, [out, retval] IWMPCdrom** ppCdrom );
  447. }
  448.  
  449. //////////////////////////////////////////////////////////////////////
  450. //          MediaCollection Interfaces
  451. //////////////////////////////////////////////////////////////////////
  452.  
  453. [
  454.     object,
  455.     uuid(4a976298-8c0d-11d3-b389-00c04f68574b),
  456.     dual,
  457.     helpstring("IWMPStringCollection Interface"),
  458.     pointer_default(unique)
  459. ]
  460. interface IWMPStringCollection : IDispatch
  461. {
  462.     // properties
  463.     [ id( DISPID_WMPSTRINGCOLLECTION_COUNT ), propget, helpstring( "Returns the number of items in the string collection" ) ]
  464.         HRESULT count( [out, retval] long* plCount );
  465.     
  466.     // methods
  467.     [ id( DISPID_WMPSTRINGCOLLECTION_ITEM ), helpstring( "Returns the string at the given index" ) ]
  468.         HRESULT item( [in] long lIndex, [out, retval] BSTR* pbstrString );
  469. }
  470.  
  471. [
  472.     object,
  473.     uuid(8363BC22-B4B4-4b19-989D-1CD765749DD1),
  474.     dual,
  475.     helpstring("IWMPMediaCollection Interface"),
  476.     pointer_default(unique)
  477. ]
  478. interface IWMPMediaCollection : IDispatch
  479. {
  480.     // methods
  481.     [ id( DISPID_WMPMEDIACOLLECTION_ADD ), helpstring( "Creates a new media object" ) ]
  482.         HRESULT add( [in] BSTR bstrURL, [out, retval] IWMPMedia **ppItem );
  483.     [ id( DISPID_WMPMEDIACOLLECTION_GETALL ), helpstring( "Returns a collection of all the items" ) ]
  484.         HRESULT getAll( [out, retval] IWMPPlaylist** ppMediaItems );
  485.     [ id( DISPID_WMPMEDIACOLLECTION_GETBYNAME ), helpstring( "Returns a collection of items with the given name" ) ]
  486.         HRESULT getByName( [in] BSTR bstrName, [out, retval] IWMPPlaylist **ppMediaItems );
  487.     [ id( DISPID_WMPMEDIACOLLECTION_GETBYGENRE ), helpstring( "Returns a collection of items with the given genre" ) ]
  488.         HRESULT getByGenre( [in] BSTR bstrGenre, [out, retval] IWMPPlaylist **ppMediaItems );
  489.     [ id( DISPID_WMPMEDIACOLLECTION_GETBYAUTHOR ), helpstring( "Returns a collection of items by a given author" ) ]
  490.         HRESULT getByAuthor( [in] BSTR bstrAuthor, [out, retval] IWMPPlaylist **ppMediaItems );
  491.     [ id( DISPID_WMPMEDIACOLLECTION_GETBYALBUM ), helpstring( "Returns a collection of items from the given album" ) ]
  492.         HRESULT getByAlbum( [in] BSTR bstrAlbum, [out, retval] IWMPPlaylist **ppMediaItems );
  493.     [ id( DISPID_WMPMEDIACOLLECTION_GETBYATTRIBUTE ), helpstring( "Returns a collection of items with the given attribute" ) ]
  494.         HRESULT getByAttribute( [in] BSTR bstrAttribute, [in] BSTR bstrValue, [out, retval] IWMPPlaylist **ppMediaItems );
  495.     [ id( DISPID_WMPMEDIACOLLECTION_REMOVE ), helpstring( "Removes an item from the media collection" ) ]
  496.         HRESULT remove( [in] IWMPMedia *pItem, [in] VARIANT_BOOL varfDeleteFile );
  497.     [ id( DISPID_WMPMEDIACOLLECTION_GETATTRIBUTESTRINGCOLLECTION ), helpstring( "Returns the string collection associated with an attribute" ) ]
  498.         HRESULT getAttributeStringCollection( [in] BSTR bstrAttribute, [in] BSTR bstrMediaType, [out, retval] IWMPStringCollection** ppStringCollection );
  499.     [ id( DISPID_WMPMEDIACOLLECTION_GETMEDIAATOM ), helpstring( "Gets an atom associated with an item name which can be requested from an IWMPMedia out of this collection via getItemInfoByAtom" ) ]
  500.         HRESULT getMediaAtom( [in] BSTR bstrItemName, [out, retval] long* plAtom);
  501.     [ id( DISPID_WMPMEDIACOLLECTION_SETDELETED ), helpstring( "Sets the deleted flag on a media object" ) ]
  502.         HRESULT setDeleted( [in] IWMPMedia* pItem, [in] VARIANT_BOOL varfIsDeleted );
  503.     [ id( DISPID_WMPMEDIACOLLECTION_ISDELETED ), helpstring( "Gets the deleted flag on a media object" ) ]
  504.         HRESULT isDeleted( [in] IWMPMedia* pItem, [out, retval] VARIANT_BOOL* pvarfIsDeleted );
  505. }
  506.  
  507. //////////////////////////////////////////////////////////////////////
  508. //          PlaylistCollection Interfaces
  509. //////////////////////////////////////////////////////////////////////
  510.  
  511. [
  512.     object,
  513.     uuid(679409c0-99f7-11d3-9fb7-00105aa620bb),
  514.     dual,
  515.     helpstring("IWMPPlaylistArray Interface"),
  516.     pointer_default(unique)
  517. ]
  518. interface IWMPPlaylistArray : IDispatch
  519. {
  520.     // properties
  521.     [ id( DISPID_WMPPLAYLISTARRAY_COUNT ), propget, helpstring( "Returns the number of items in the playlist array" ) ]
  522.         HRESULT count( [out, retval] long *plCount );
  523.  
  524.     // methods
  525.     [ id( DISPID_WMPPLAYLISTARRAY_ITEM ), helpstring( "Returns the playlist object at the given index" ) ]
  526.         HRESULT item( [in] long lIndex, [out, retval] IWMPPlaylist **ppItem );
  527. }
  528.  
  529. [
  530.     object,
  531.     uuid(10A13217-23A7-439b-B1C0-D847C79B7774),
  532.     dual,
  533.     helpstring("IWMPPlaylistCollection Interface"),
  534.     pointer_default(unique)
  535. ]
  536. interface IWMPPlaylistCollection : IDispatch
  537. {
  538.     // methods
  539.     [ id( DISPID_WMPPLAYLISTCOLLECTION_NEWPLAYLIST ), helpstring( "Creates a new playlist object" ) ]
  540.         HRESULT newPlaylist( [in] BSTR bstrName, [out, retval] IWMPPlaylist **ppItem );
  541.     [ id( DISPID_WMPPLAYLISTCOLLECTION_GETALL ), helpstring( "Returns a playlist array with all the playlists" ) ]
  542.         HRESULT getAll( [out, retval] IWMPPlaylistArray **ppPlaylistArray );
  543.     [ id( DISPID_WMPPLAYLISTCOLLECTION_GETBYNAME ), helpstring( "Returns a playlist array with playlists matching the given name" ) ]
  544.         HRESULT getByName( [in] BSTR bstrName, [out, retval] IWMPPlaylistArray **ppPlaylistArray );
  545.     [ id( DISPID_WMPPLAYLISTCOLLECTION_REMOVE ), helpstring( "Removes an item from the playlist collection" ) ]
  546.         HRESULT remove( [in] IWMPPlaylist *pItem );
  547.     [ id( DISPID_WMPPLAYLISTCOLLECTION_SETDELETED ), helpstring( "Sets the deleted flag on a playlist object" ) ]
  548.         HRESULT setDeleted( [in] IWMPPlaylist* pItem, [in] VARIANT_BOOL varfIsDeleted );
  549.     [ id( DISPID_WMPPLAYLISTCOLLECTION_ISDELETED ), helpstring( "Gets the deleted flag on a playlist object" ) ]
  550.         HRESULT isDeleted( [in] IWMPPlaylist* pItem, [out, retval] VARIANT_BOOL* pvarfIsDeleted );
  551.     [ id( DISPID_WMPPLAYLISTCOLLECTION_IMPORTPLAYLIST ), helpstring( "Imports a playlist object into the library" ) ]
  552.         HRESULT importPlaylist( [in] IWMPPlaylist* pItem, [out, retval] IWMPPlaylist** ppImportedItem );
  553. }
  554.  
  555. //////////////////////////////////////////////////////////////////////
  556. //          Network Interfaces
  557. //////////////////////////////////////////////////////////////////////
  558.  
  559. [
  560.     object,
  561.     uuid(EC21B779-EDEF-462d-BBA4-AD9DDE2B29A7),
  562.     dual,
  563.     helpstring("IWMPNetwork Interface"),
  564.     pointer_default(unique)
  565. ]
  566. interface IWMPNetwork : IDispatch
  567. {
  568.     // properties
  569.     [ id( DISPID_WMPNETWORK_BANDWIDTH ), propget, helpstring( "Returns the current bandwidth of the clip." ) ]
  570.         HRESULT bandWidth( [out, retval] long *plBandwidth );
  571.     [ id( DISPID_WMPNETWORK_RECOVEREDPACKETS ), propget, helpstring( "Returns the number of recovered packets" ) ]
  572.         HRESULT recoveredPackets( [out, retval] long *plRecoveredPackets );
  573.     [ id( DISPID_WMPNETWORK_SOURCEPROTOCOL ), propget, helpstring( "Returns the source protocol used to receive data." ) ]
  574.         HRESULT sourceProtocol( [out, retval] BSTR *pbstrSourceProtocol );
  575.     [ id( DISPID_WMPNETWORK_RECEIVEDPACKETS ), propget, helpstring( "Returns the number of packets received." ) ]
  576.         HRESULT receivedPackets( [out, retval] long *plReceivedPackets );
  577.     [ id( DISPID_WMPNETWORK_LOSTPACKETS ), propget, helpstring( "Returns the number of packets lost." ) ]
  578.         HRESULT lostPackets( [out, retval] long *plLostPackets );
  579.     [ id( DISPID_WMPNETWORK_RECEPTIONQUALITY ), propget, helpstring( "Returns the percentage of packets received in the last 15 seconds." ) ]
  580.         HRESULT receptionQuality( [out, retval] long *plReceptionQuality );
  581.     [ id( DISPID_WMPNETWORK_BUFFERINGCOUNT ), propget, helpstring( "Returns the number of times buffering occurred during clip playback." ) ]
  582.         HRESULT bufferingCount( [out, retval] long *plBufferingCount );
  583.     [ id( DISPID_WMPNETWORK_BUFFERINGPROGRESS ), propget, helpstring( "Returns the percentage of buffering completed." ) ]
  584.         HRESULT bufferingProgress( [out, retval] long *plBufferingProgress );
  585.     [ id( DISPID_WMPNETWORK_BUFFERINGTIME ), propget, helpstring( "Returns the number of seconds allocated for buffering for this media type." ) ]
  586.         HRESULT bufferingTime( [out, retval] long *plBufferingTime );
  587.     [ id( DISPID_WMPNETWORK_BUFFERINGTIME ), propput, helpstring( "Sets the amount of time in milliseconds that the player allocates for buffering incoming data." ) ]
  588.         HRESULT bufferingTime( [in] long lBufferingTime );
  589.     [ id( DISPID_WMPNETWORK_FRAMERATE ), propget, helpstring( "Current video frame rate in frames/second" ) ]
  590.         HRESULT frameRate( [out, retval] long *plFrameRate );
  591.     [ id( DISPID_WMPNETWORK_MAXBITRATE ), propget, helpstring( "Maximum possible video bit rate" ) ]
  592.         HRESULT maxBitRate( [out, retval] long *plBitRate );
  593.     [ id( DISPID_WMPNETWORK_BITRATE ), propget, helpstring( "Current video bit rate" ) ]
  594.         HRESULT bitRate( [out, retval] long *plBitRate );
  595.     [ id( DISPID_WMPNETWORK_GETPROXYSETTINGS ), helpstring( "Returns the proxy settings for the specified protocol" ) ]
  596.         HRESULT getProxySettings( [in] BSTR bstrProtocol, [out, retval] long *plProxySetting );
  597.     [ id( DISPID_WMPNETWORK_SETPROXYSETTINGS ), helpstring( "Sets the proxy settings for the specified protocol" ) ]
  598.         HRESULT setProxySettings( [in] BSTR bstrProtocol, [in] long lProxySetting );
  599.     [ id( DISPID_WMPNETWORK_GETPROXYNAME ), helpstring( "Returns the proxy name for the specified protocol" ) ]
  600.         HRESULT getProxyName( [in] BSTR bstrProtocol, [out, retval] BSTR *pbstrProxyName );
  601.     [ id( DISPID_WMPNETWORK_SETPROXYNAME ), helpstring( "Sets the proxy name for the specified protocol" ) ]
  602.         HRESULT setProxyName( [in] BSTR bstrProtocol, [in] BSTR bstrProxyName );
  603.     [ id( DISPID_WMPNETWORK_GETPROXYPORT ), helpstring( "Returns the proxy port for the specified protocol" ) ]
  604.         HRESULT getProxyPort( [in] BSTR bstrProtocol, [out, retval] long * lProxyPort );
  605.     [ id( DISPID_WMPNETWORK_SETPROXYPORT ), helpstring( "Sets the proxy port for the specified protocol" ) ]
  606.         HRESULT setProxyPort( [in] BSTR bstrProtocol, [in] long lProxyPort );
  607.     [ id( DISPID_WMPNETWORK_GETPROXYEXCEPTIONLIST ), helpstring( "Returns the proxy exception list for the specified protocol" ) ]
  608.         HRESULT getProxyExceptionList( [in] BSTR bstrProtocol, [out, retval] BSTR *pbstrExceptionList );
  609.     [ id( DISPID_WMPNETWORK_SETPROXYEXCEPTIONLIST ), helpstring( "Sets the proxy exception list for the specified protocol" ) ]
  610.         HRESULT setProxyExceptionList( [in] BSTR bstrProtocol, [in] BSTR pbstrExceptionList );
  611.     [ id( DISPID_WMPNETWORK_GETPROXYBYPASSFORLOCAL ), helpstring( "Returns whether or not to bypass the proxy for local addresses" ) ]
  612.         HRESULT getProxyBypassForLocal( [in] BSTR bstrProtocol, [out, retval] VARIANT_BOOL *pfBypassForLocal );
  613.     [ id( DISPID_WMPNETWORK_SETPROXYBYPASSFORLOCAL ), helpstring( "Sets whether or not to by pass the proxy for local addresses" ) ]
  614.         HRESULT setProxyBypassForLocal( [in] BSTR bstrProtocol, [in] VARIANT_BOOL fBypassForLocal );
  615.     [ id( DISPID_WMPNETWORK_MAXBANDWIDTH ), propget, helpstring( "Returns or sets maximum allowed bandwidth" ) ]
  616.         HRESULT maxBandwidth( [out, retval] long * lMaxBandwidth );
  617.     [ id( DISPID_WMPNETWORK_MAXBANDWIDTH ), propput ]
  618.         HRESULT maxBandwidth( [in] long lMaxBandwidth );
  619.     [ id( DISPID_WMPNETWORK_DOWNLOADPROGRESS ), propget, helpstring( "Returns the percentage of download completed." ) ]
  620.         HRESULT downloadProgress( [out, retval] long *plDownloadProgress );
  621.     [ id( DISPID_WMPNETWORK_ENCODEDFRAMERATE ), propget, helpstring( "Returns the video frame rate, in frames/second, that the file was encoded in" ) ]
  622.         HRESULT encodedFrameRate( [out, retval] long *plFrameRate );
  623.     [ id( DISPID_WMPNETWORK_FRAMESSKIPPED ), propget, helpstring( "Returns the number of skipped frames" ) ]
  624.         HRESULT framesSkipped( [out, retval] long *plFrames );
  625. }
  626.  
  627. //////////////////////////////////////////////////////////////////////
  628. //          Core Interfaces
  629. //////////////////////////////////////////////////////////////////////
  630.  
  631. [
  632.     object,
  633.     uuid(D84CCA99-CCE2-11d2-9ECC-0000F8085981),
  634.     dual,
  635.     helpstring("IWMPCore Interface"),
  636.     pointer_default(unique)
  637. ]
  638. interface IWMPCore : IDispatch
  639. {
  640.     // methods
  641.  
  642.     [ id(DISPID_WMPCORE_CLOSE), helpstring("Closes the media") ]
  643.         HRESULT close();
  644.  
  645.     // properties
  646.  
  647.     [ id( DISPID_WMPCORE_URL ), propget, helpstring( "Returns or sets the URL" ) ]
  648.         HRESULT URL( [out, retval] BSTR *pbstrURL );
  649.     [ id( DISPID_WMPCORE_URL ), propput ]
  650.         HRESULT URL( [in] BSTR bstrURL );
  651.     [ id( DISPID_WMPCORE_OPENSTATE ), propget, helpstring( "Returns the open state of the player" ) ]
  652.         HRESULT openState( [out, retval] WMPOpenState *pwmpos );
  653.     [ id( DISPID_WMPCORE_PLAYSTATE ), propget, helpstring( "Returns the play state of the player" ) ]
  654.         HRESULT playState( [out, retval] WMPPlayState *pwmpps );
  655.     [ id(DISPID_WMPCORE_CONTROLS), propget, helpstring("Returns the control handler")]
  656.         HRESULT controls([out, retval] IWMPControls **ppControl);
  657.     [ id(DISPID_WMPCORE_SETTINGS), propget, helpstring("Returns the settings handler")]
  658.         HRESULT settings([out, retval] IWMPSettings **ppSettings);
  659.     [ id(DISPID_WMPCORE_CURRENTMEDIA), propget, helpstring("Returns or sets the current media object")]
  660.         HRESULT currentMedia([out, retval] IWMPMedia **ppMedia);
  661.     [ id(DISPID_WMPCORE_CURRENTMEDIA), propput]
  662.         HRESULT currentMedia([in] IWMPMedia *pMedia);
  663.     [ id(DISPID_WMPCORE_MEDIACOLLECTION), propget, helpstring("Returns the media collection handler")]
  664.         HRESULT mediaCollection([out, retval] IWMPMediaCollection **ppMediaCollection);
  665.     [ id(DISPID_WMPCORE_PLAYLISTCOLLECTION), propget, helpstring("Returns the playlist collection handler")]
  666.         HRESULT playlistCollection([out, retval] IWMPPlaylistCollection **ppPlaylistCollection);
  667.     [ id( DISPID_WMPCORE_VERSIONINFO ), propget, helpstring( "Returns the version information for the player" ) ]
  668.         HRESULT versionInfo( [out, retval] BSTR * pbstrVersionInfo );
  669.  
  670.     [id ( DISPID_WMPCORE_LAUNCHURL)]
  671.         HRESULT launchURL(BSTR bstrURL);
  672.  
  673.     [propget, id(DISPID_WMPCORE_NETWORK), helpstring("Returns the network information handler")]
  674.         HRESULT network([out, retval] IWMPNetwork **ppQNI);
  675.     [ id( DISPID_WMPCORE_CURRENTPLAYLIST), propget, helpstring( "Returns/sets the current playlist" ) ]
  676.         HRESULT currentPlaylist( [out, retval] IWMPPlaylist **ppPL );
  677.     [ id( DISPID_WMPCORE_CURRENTPLAYLIST), propput, helpstring( "Returns the playlist handler" ) ]
  678.         HRESULT currentPlaylist( [in] IWMPPlaylist *pPL );
  679.     [ id( DISPID_WMPCORE_CDROMCOLLECTION ), propget, helpstring("Get the CDROM drive collection") ]
  680.         HRESULT cdromCollection ([out, retval] IWMPCdromCollection** ppCdromCollection);
  681.     [ id(DISPID_WMPCORE_CLOSEDCAPTION), propget, helpstring("Returns the closed caption handler")]
  682.         HRESULT closedCaption([out, retval] IWMPClosedCaption **ppClosedCaption);
  683.     [ id(DISPID_WMPCORE_ISONLINE), propget, helpstring( "Returns whether the machine is online." ) ]
  684.         HRESULT isOnline( [out, retval] VARIANT_BOOL *pfOnline );
  685.     [ id(DISPID_WMPCORE_ERROR), propget, helpstring("Returns the error object")]
  686.         HRESULT error([out, retval] IWMPError **ppError);
  687.     [ id(DISPID_WMPCORE_STATUS), propget, helpstring("Returns status string")]
  688.         HRESULT status([out, retval] BSTR *pbstrStatus);
  689. }
  690.  
  691. //////////////////////////////////////////////////////////////////////
  692. //          Player Interfaces
  693. //////////////////////////////////////////////////////////////////////
  694.  
  695. [
  696.     object,
  697.     uuid(6BF52A4F-394A-11d3-B153-00C04F79FAA6),
  698.     dual,
  699.     helpstring("IWMPPlayer Interface"),
  700.     pointer_default(unique)
  701. ]
  702. interface IWMPPlayer : IWMPCore
  703. {
  704.     [ id(DISPID_WMPOCX_ENABLED), propget, helpstring("Returns a boolen value specifying whether or not the control is enabled")]
  705.         HRESULT enabled([out, retval] VARIANT_BOOL *pbEnabled);
  706.     [ id(DISPID_WMPOCX_ENABLED), propput, helpstring("Sets a boolean value specifying whether or not the control is enabled")]
  707.         HRESULT enabled([in] VARIANT_BOOL bEnabled);
  708.     [ id(DISPID_WMPOCX_FULLSCREEN), propget, helpstring("Returns a boolean value specifying whether or not the control is in full screen mode")]
  709.         HRESULT fullScreen([out, retval] VARIANT_BOOL *pbFullScreen);
  710.     [ id(DISPID_WMPOCX_FULLSCREEN), propput, helpstring("Sets a boolean value specifying whether or not the control is in full screen mode")]
  711.         HRESULT fullScreen(VARIANT_BOOL bFullScreen);
  712.     [ id(DISPID_WMPOCX_ENABLECONTEXTMENU), propget, helpstring("Returns a boolean value specifying whether or not the context menu is enabled on the control")]
  713.         HRESULT enableContextMenu([out, retval] VARIANT_BOOL *pbEnableContextMenu);
  714.     [ id(DISPID_WMPOCX_ENABLECONTEXTMENU), propput, helpstring("Sets a boolean value specifying whether or not the context menu is enabled on the control")]
  715.         HRESULT enableContextMenu(VARIANT_BOOL bEnableContextMenu);
  716.     [ id(DISPID_WMPOCX_UIMODE), propput, helpstring("Specifies the ui mode to select")]
  717.         HRESULT uiMode([in] BSTR bstrMode);
  718.     [ id(DISPID_WMPOCX_UIMODE), propget, helpstring("Returns the currently selected ui mode")]
  719.         HRESULT uiMode([out, retval] BSTR *pbstrMode);
  720. }
  721.  
  722.  
  723.  
  724.  
  725. //////////////////////////////////////////////////////////////////////
  726. //          Player2 Interface
  727. //////////////////////////////////////////////////////////////////////
  728.  
  729. [
  730.     object,
  731.     uuid(0E6B01D1-D407-4c85-BF5F-1C01F6150280),
  732.     dual,
  733.     helpstring("IWMPPlayer2 Interface"),
  734.     pointer_default(unique)
  735. ]
  736. interface IWMPPlayer2 : IWMPCore
  737. {
  738.     [ id(DISPID_WMPOCX_ENABLED), propget, helpstring("Returns a boolen value specifying whether or not the control is enabled")]
  739.         HRESULT enabled([out, retval] VARIANT_BOOL *pbEnabled);
  740.     [ id(DISPID_WMPOCX_ENABLED), propput, helpstring("Sets a boolean value specifying whether or not the control is enabled")]
  741.         HRESULT enabled([in] VARIANT_BOOL bEnabled);
  742.     [ id(DISPID_WMPOCX_FULLSCREEN), propget, helpstring("Returns a boolean value specifying whether or not the control is in full screen mode")]
  743.         HRESULT fullScreen([out, retval] VARIANT_BOOL *pbFullScreen);
  744.     [ id(DISPID_WMPOCX_FULLSCREEN), propput, helpstring("Sets a boolean value specifying whether or not the control is in full screen mode")]
  745.         HRESULT fullScreen(VARIANT_BOOL bFullScreen);
  746.     [ id(DISPID_WMPOCX_ENABLECONTEXTMENU), propget, helpstring("Returns a boolean value specifying whether or not the context menu is enabled on the control")]
  747.         HRESULT enableContextMenu([out, retval] VARIANT_BOOL *pbEnableContextMenu);
  748.     [ id(DISPID_WMPOCX_ENABLECONTEXTMENU), propput, helpstring("Sets a boolean value specifying whether or not the context menu is enabled on the control")]
  749.         HRESULT enableContextMenu(VARIANT_BOOL bEnableContextMenu);
  750.     [ id(DISPID_WMPOCX_UIMODE), propput, helpstring("Specifies the ui mode to select")]
  751.         HRESULT uiMode([in] BSTR bstrMode);
  752.     [ id(DISPID_WMPOCX_UIMODE), propget, helpstring("Returns the currently selected ui mode")]
  753.         HRESULT uiMode([out, retval] BSTR *pbstrMode);
  754.     [ id(DISPID_WMPOCX2_STRETCHTOFIT), propget, helpstring("Returns a boolen value specifying whether or not video is stretched")]
  755.         HRESULT stretchToFit([out, retval] VARIANT_BOOL *pbEnabled);
  756.     [ id(DISPID_WMPOCX2_STRETCHTOFIT), propput, helpstring("Sets a boolean value specifying whether or not video is stretched")]
  757.         HRESULT stretchToFit([in] VARIANT_BOOL bEnabled);
  758.     [ id(DISPID_WMPOCX2_WINDOWLESSVIDEO), propget, helpstring("Returns a boolen value specifying whether or not video is windowless")]
  759.         HRESULT windowlessVideo([out, retval] VARIANT_BOOL *pbEnabled);
  760.     [ id(DISPID_WMPOCX2_WINDOWLESSVIDEO), propput, helpstring("Sets a boolean value specifying whether or not video is windowless")]
  761.         HRESULT windowlessVideo([in] VARIANT_BOOL bEnabled);
  762. }
  763.  
  764.  
  765.  
  766. //////////////////////////////////////////////////////////////////////
  767. //          WMP OCX Object
  768. //////////////////////////////////////////////////////////////////////
  769.  
  770. [
  771.     uuid(6BF52A50-394A-11d3-B153-00C04F79FAA6),
  772.     version(1.0),
  773.     helpstring("Windows Media Player OCX")
  774. ]
  775. library WMPOCX
  776. {
  777.     importlib("stdole32.tlb");
  778.     importlib("stdole2.tlb");
  779.  
  780.     [
  781.         uuid(6BF52A51-394A-11d3-B153-00C04F79FAA6),
  782.         helpstring("Event interface for Windows Media Player OCX"),
  783.         hidden
  784.     ]
  785.     dispinterface _WMPOCXEvents
  786.     {
  787.         properties:
  788.         methods:
  789.  
  790.         //////////////////////////////////////////////////////////////////////
  791.         //      Events
  792.         //////////////////////////////////////////////////////////////////////
  793.  
  794.         // Graph creation
  795.         [ id( DISPID_WMPCOREEVENT_OPENSTATECHANGE ), helpstring( "Sent when the control changes OpenState" ) ]
  796.             void OpenStateChange( [in] long NewState );
  797.  
  798.         // control
  799.         [ id( DISPID_WMPCOREEVENT_PLAYSTATECHANGE ), helpstring( "Sent when the control changes PlayState" ) ]
  800.             void PlayStateChange( [in] long NewState );
  801.  
  802.         // content
  803.         [ id( DISPID_WMPCOREEVENT_SCRIPTCOMMAND ), helpstring( "Sent when a synchronized command or URL is received" ) ]
  804.             void ScriptCommand( [in] BSTR scType, [in] BSTR Param );
  805.  
  806.         // network
  807.         [ id( DISPID_WMPCOREEVENT_NEWSTREAM ), helpstring( "Sent when a new stream is started in a channel" ) ]
  808.             void NewStream();
  809.         [ id( DISPID_WMPCOREEVENT_DISCONNECT ), helpstring( "Sent when the control is disconnected from the server" ) ]
  810.             void Disconnect( [in] long Result );
  811.  
  812.         [ id( DISPID_WMPCOREEVENT_BUFFERING ), helpstring( "Sent when the control begins or ends buffering" ) ]
  813.             void Buffering( [in] VARIANT_BOOL Start );
  814.  
  815.         // error
  816.         [ id( DISPID_WMPCOREEVENT_ERROR ), helpstring( "Sent when the control has an error condition" ) ]
  817.             void Error();
  818.  
  819.         // warning
  820.         [ id( DISPID_WMPCOREEVENT_WARNING ), helpstring( "Sent when the control encounters a problem" ) ]
  821.             void Warning( [in] long WarningType, [in] long Param, [in] BSTR Description );
  822.  
  823.  
  824.         // seek
  825.         [ id( DISPID_WMPCOREEVENT_ENDOFSTREAM ), helpstring( "Sent when the end of file is reached" ) ]
  826.             void EndOfStream( [in] long Result );
  827.         [id(DISPID_WMPCOREEVENT_POSITIONCHANGE), helpstring("Indicates that the current position of the movie has changed")]
  828.             void PositionChange([in] double oldPosition, [in] double newPosition);
  829.  
  830.         [ id( DISPID_WMPCOREEVENT_MARKERHIT ), helpstring( "Sent when a marker is reached" ) ]
  831.             void MarkerHit( [in] long MarkerNum );
  832.  
  833.         [id(DISPID_WMPCOREEVENT_DURATIONUNITCHANGE), helpstring("Indicates that the unit used to express duration and position has changed")]
  834.             void DurationUnitChange(long NewDurationUnit);
  835.  
  836.         // cdrom
  837.         [id(DISPID_WMPCOREEVENT_CDROMMEDIACHANGE), helpstring("Indicates that the CD ROM media has changed") ]
  838.                 void CdromMediaChange( [in] long CdromNum );
  839.  
  840.         // playlist
  841.         [id(DISPID_WMPCOREEVENT_PLAYLISTCHANGE), helpstring("Sent when a playlist changes") ]
  842.                 void PlaylistChange( [in] IDispatch * Playlist, [in] WMPPlaylistChangeEventType change );
  843.                 
  844.         [id(DISPID_WMPCOREEVENT_CURRENTPLAYLISTCHANGE), helpstring("Sent when the current playlist changes") ]
  845.                 void CurrentPlaylistChange( [in] WMPPlaylistChangeEventType change );
  846.         [id(DISPID_WMPCOREEVENT_CURRENTPLAYLISTITEMAVAILABLE), helpstring("Sent when a current playlist item becomes available") ]
  847.                 void CurrentPlaylistItemAvailable(BSTR bstrItemName);
  848.         [id(DISPID_WMPCOREEVENT_MEDIACHANGE), helpstring("Sent when a media object changes") ]
  849.                 void MediaChange( [in] IDispatch * Item);
  850.         [id(DISPID_WMPCOREEVENT_CURRENTMEDIAITEMAVAILABLE), helpstring("Sent when a current media item becomes available") ]
  851.                 void CurrentMediaItemAvailable(BSTR bstrItemName);
  852.         [id(DISPID_WMPCOREEVENT_CURRENTITEMCHANGE), helpstring("Sent when the item selection on the current playlist changes") ]
  853.                 void CurrentItemChange( [in] IDispatch *pdispMedia);
  854.         [id(DISPID_WMPCOREEVENT_MEDIACOLLECTIONCHANGE), helpstring("Sent when the media collection needs to be requeried") ]
  855.                 void MediaCollectionChange();
  856.         [id(DISPID_WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGADDED), helpstring("Sent when an attribute string is added in the media collection") ]
  857.                 void MediaCollectionAttributeStringAdded(BSTR bstrAttribName, BSTR bstrAttribVal);
  858.         [id(DISPID_WMPCOREEVENT_MEDIACOLLECTIONATTRIBUTESTRINGREMOVED), helpstring("Sent when an attribute string is removed from the media collection") ]
  859.                 void MediaCollectionAttributeStringRemoved(BSTR bstrAttribName, BSTR bstrAttribVal);
  860.         [id(DISPID_WMPCOREEVENT_PLAYLISTCOLLECTIONCHANGE), helpstring("Sent when playlist collection needs to be requeried") ]
  861.                 void PlaylistCollectionChange();
  862.         [id(DISPID_WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTADDED), helpstring("Sent when a playlist is added to the playlist collection") ]
  863.                 void PlaylistCollectionPlaylistAdded([in] BSTR bstrPlaylistName);
  864.         [id(DISPID_WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTREMOVED), helpstring("Sent when a playlist is removed from the playlist collection") ]
  865.                 void PlaylistCollectionPlaylistRemoved([in] BSTR bstrPlaylistName);
  866.         [id(DISPID_WMPCOREEVENT_PLAYLISTCOLLECTIONPLAYLISTSETASDELETED), helpstring("Sent when a playlist has been set or reset as deleted")]
  867.                 void PlaylistCollectionPlaylistSetAsDeleted([in] BSTR bstrPlaylistName, [in] VARIANT_BOOL varfIsDeleted);
  868.         [id(DISPID_WMPCOREEVENT_MODECHANGE), helpstring("Playlist playback mode has changed")]
  869.                 void ModeChange([in] BSTR ModeName, [in] VARIANT_BOOL NewValue);
  870.  
  871.     }; 
  872.  
  873.     [
  874.         uuid(6BF52A52-394A-11d3-B153-00C04F79FAA6),
  875.         helpstring("Windows Media Player OCX")
  876.     ]
  877.     coclass WMPOCX
  878.     {
  879.         [default] interface IWMPPlayer;
  880.         interface IWMPPlayer2;
  881.         interface IWMPControls;
  882.         interface IWMPSettings;
  883.         interface IWMPPlaylist;
  884.         interface IWMPMedia;
  885.         interface IWMPMediaCollection;
  886.         interface IWMPPlaylistCollection;
  887.         interface IWMPCdromCollection;
  888.         interface IWMPError;
  889.         interface IWMPErrorItem;
  890.         interface IWMPClosedCaption;
  891.         [default, source] dispinterface _WMPOCXEvents;
  892.  
  893.     };
  894.  
  895. };
  896.  
  897.  
  898. //*****************************************************************************
  899. //
  900. //  End of File
  901. //
  902. //*****************************************************************************
  903.  
  904.