2 * Copyright 2014 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/heap.h"
23 #include "wine/unicode.h"
28 IConnectionPoint IConnectionPoint_iface
;
30 IConnectionPointContainer
*container
;
39 IWMPMedia IWMPMedia_iface
;
46 struct WindowsMediaPlayer
{
47 IOleObject IOleObject_iface
;
48 IProvideClassInfo2 IProvideClassInfo2_iface
;
49 IPersistStreamInit IPersistStreamInit_iface
;
50 IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface
;
51 IConnectionPointContainer IConnectionPointContainer_iface
;
52 IOleControl IOleControl_iface
;
53 IWMPPlayer4 IWMPPlayer4_iface
;
54 IWMPPlayer IWMPPlayer_iface
;
55 IWMPSettings IWMPSettings_iface
;
56 IWMPControls IWMPControls_iface
;
57 IWMPNetwork IWMPNetwork_iface
;
61 IOleClientSite
*client_site
;
66 VARIANT_BOOL auto_start
;
67 VARIANT_BOOL invoke_urls
;
68 VARIANT_BOOL enable_error_dialogs
;
70 ConnectionPoint
*wmpocx
;
75 void init_player(WindowsMediaPlayer
*) DECLSPEC_HIDDEN
;
76 void destroy_player(WindowsMediaPlayer
*) DECLSPEC_HIDDEN
;
77 IWMPMedia
* create_media_from_url(BSTR url
);
78 void ConnectionPointContainer_Init(WindowsMediaPlayer
*wmp
) DECLSPEC_HIDDEN
;
79 void ConnectionPointContainer_Destroy(WindowsMediaPlayer
*wmp
) DECLSPEC_HIDDEN
;
81 HRESULT WINAPI
WMPFactory_CreateInstance(IClassFactory
*,IUnknown
*,REFIID
,void**) DECLSPEC_HIDDEN
;
83 void unregister_wmp_class(void) DECLSPEC_HIDDEN
;
85 extern HINSTANCE wmp_instance DECLSPEC_HIDDEN
;
87 static inline WCHAR
*heap_strdupW(const WCHAR
*str
)
92 size_t size
= strlenW(str
)+1;
93 ret
= heap_alloc(size
*sizeof(WCHAR
));
95 memcpy(ret
, str
, size
*sizeof(WCHAR
));