ReactOS 0.4.16-dev-983-g23ad936
wmvcore_main.c
Go to the documentation of this file.
1/*
2 * Copyright 2012 Austin English
3 *
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.
8 *
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.
13 *
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
17 */
18
19#include "wmvcore.h"
20
21#include "initguid.h"
22#include "wmsdk.h"
23#include "wine/debug.h"
24#include "wine/heap.h"
25
27
29{
30 TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
31
32 switch (fdwReason)
33 {
34#ifndef __REACTOS__
35 case DLL_WINE_PREATTACH:
36 return FALSE; /* prefer native version */
37#endif
40 break;
41 }
42
43 return TRUE;
44}
45
47{
48 FIXME("(): stub\n");
49
50 return S_OK;
51}
52
54{
55 FIXME("(%s): stub\n", wine_dbgstr_w(url));
56
57 if (!url)
58 return E_INVALIDARG;
59
60 return NS_E_INVALID_NAME;
61}
62
64{
65 FIXME("(%s): stub\n", wine_dbgstr_w(scheme));
66
67 return NS_E_INVALID_NAME;
68}
69
71{
72 FIXME("(%p): stub\n", editor);
73
74 *editor = NULL;
75
76 return E_NOTIMPL;
77}
78
80{
81 FIXME("(%p %p): stub\n", callback, licBackup);
82
83 if (!callback)
84 return E_INVALIDARG;
85
86 *licBackup = NULL;
87
88 return E_NOTIMPL;
89}
90
91typedef struct {
95
97{
98 return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager2_iface);
99}
100
102{
104
106 TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
107 *ppv = &This->IWMProfileManager2_iface;
108 }else if(IsEqualGUID(&IID_IWMProfileManager, riid)) {
109 TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv);
110 *ppv = &This->IWMProfileManager2_iface;
111 }else if(IsEqualGUID(&IID_IWMProfileManager2, riid)) {
112 TRACE("(%p)->(IID_IWMProfileManager2 %p)\n", This, ppv);
113 *ppv = &This->IWMProfileManager2_iface;
114 }else {
115 FIXME("Unsupported iface %s\n", debugstr_guid(riid));
116 *ppv = NULL;
117 return E_NOINTERFACE;
118 }
119
120 IUnknown_AddRef((IUnknown*)*ppv);
121 return S_OK;
122}
123
125{
128
129 TRACE("(%p) ref=%d\n", This, ref);
130
131 return ref;
132}
133
135{
138
139 TRACE("(%p) ref=%d\n", This, ref);
140
141 if(!ref)
143
144 return ref;
145}
146
148{
150 FIXME("(%p)->(%x %p)\n", This, version, ret);
151 return E_NOTIMPL;
152}
153
155{
157 FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret);
158 return E_NOTIMPL;
159}
160
162{
164 FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret);
165 return E_NOTIMPL;
166}
167
169{
171 FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len);
172 return E_NOTIMPL;
173}
174
176{
178 FIXME("(%p)->(%p)\n", This, ret);
179 return E_NOTIMPL;
180}
181
183{
185 FIXME("(%p)->(%d %p)\n", This, index, ret);
186 return E_NOTIMPL;
187}
188
190{
192 FIXME("(%p)->(%p)\n", This, version);
193 return E_NOTIMPL;
194}
195
197{
199 FIXME("(%p)->(%x)\n", This, version);
200 return E_NOTIMPL;
201}
202
203static const IWMProfileManager2Vtbl WMProfileManager2Vtbl = {
215};
216
218{
219 WMProfileManager *profile_mgr;
220
221 TRACE("(%p)\n", ret);
222
223 profile_mgr = heap_alloc(sizeof(*profile_mgr));
224 if(!profile_mgr)
225 return E_OUTOFMEMORY;
226
227 profile_mgr->IWMProfileManager2_iface.lpVtbl = &WMProfileManager2Vtbl;
228 profile_mgr->ref = 1;
229
231 return S_OK;
232}
static DWORD const fdwReason
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
static const WCHAR version[]
Definition: asmname.c:66
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint index
Definition: glext.h:6031
GLenum GLsizei len
Definition: glext.h:6722
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define profile
Definition: kernel32.h:12
#define debugstr_w
Definition: kernel32.h:32
#define wine_dbgstr_w
Definition: kernel32.h:34
static IN DWORD IN LPVOID lpvReserved
const GUID * guid
static IPrintDialogCallback callback
Definition: printdlg.c:326
static const WCHAR url[]
Definition: encode.c:1432
#define NS_E_INVALID_NAME
Definition: nserror.h:65
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
DWORD scheme
#define TRACE(s)
Definition: solgame.cpp:4
IWMProfileManager2 IWMProfileManager2_iface
Definition: wmvcore_main.c:92
Definition: scsiwmi.h:51
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
int ret
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
WMT_VERSION
Definition: wmsdkidl.idl:160
static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager2 *iface, REFIID riid, void **ppv)
Definition: wmvcore_main.c:101
static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager2 *iface, REFGUID guid, IWMProfile **ret)
Definition: wmvcore_main.c:154
HRESULT WINAPI WMCheckURLScheme(const WCHAR *scheme)
Definition: wmvcore_main.c:63
HRESULT WINAPI DllRegisterServer(void)
Definition: wmvcore_main.c:46
HRESULT WINAPI WMCreateBackupRestorer(IUnknown *callback, IWMLicenseBackup **licBackup)
Definition: wmvcore_main.c:79
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:96
HRESULT WINAPI WMCreateProfileManager(IWMProfileManager **ret)
Definition: wmvcore_main.c:217
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: wmvcore_main.c:28
static const IWMProfileManager2Vtbl WMProfileManager2Vtbl
Definition: wmvcore_main.c:203
static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager2 *iface, DWORD *ret)
Definition: wmvcore_main.c:175
static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager2 *iface, DWORD index, IWMProfile **ret)
Definition: wmvcore_main.c:182
static HRESULT WINAPI WMProfileManager2_SetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION version)
Definition: wmvcore_main.c:196
HRESULT WINAPI WMCheckURLExtension(const WCHAR *url)
Definition: wmvcore_main.c:53
static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager2 *iface, WMT_VERSION version, IWMProfile **ret)
Definition: wmvcore_main.c:147
static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager2 *iface, const WCHAR *profile, IWMProfile **ret)
Definition: wmvcore_main.c:161
static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager2 *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
Definition: wmvcore_main.c:168
static ULONG WINAPI WMProfileManager_Release(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:134
static HRESULT WINAPI WMProfileManager2_GetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION *version)
Definition: wmvcore_main.c:189
static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:124
HRESULT WINAPI WMCreateEditor(IWMMetadataEditor **editor)
Definition: wmvcore_main.c:70
__wchar_t WCHAR
Definition: xmlstorage.h:180