ReactOS  0.4.15-dev-1070-ge1a01de
wmvcore_main.c File Reference
#include "wmvcore.h"
#include "initguid.h"
#include "wmsdk.h"
#include "wine/debug.h"
#include "wine/heap.h"
Include dependency graph for wmvcore_main.c:

Go to the source code of this file.

Classes

struct  WMProfileManager
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wmvcore)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI WMCheckURLExtension (const WCHAR *url)
 
HRESULT WINAPI WMCheckURLScheme (const WCHAR *scheme)
 
HRESULT WINAPI WMCreateEditor (IWMMetadataEditor **editor)
 
HRESULT WINAPI WMCreateBackupRestorer (IUnknown *callback, IWMLicenseBackup **licBackup)
 
static WMProfileManagerimpl_from_IWMProfileManager2 (IWMProfileManager2 *iface)
 
static HRESULT WINAPI WMProfileManager_QueryInterface (IWMProfileManager2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI WMProfileManager_AddRef (IWMProfileManager2 *iface)
 
static ULONG WINAPI WMProfileManager_Release (IWMProfileManager2 *iface)
 
static HRESULT WINAPI WMProfileManager_CreateEmptyProfile (IWMProfileManager2 *iface, WMT_VERSION version, IWMProfile **ret)
 
static HRESULT WINAPI WMProfileManager_LoadProfileByID (IWMProfileManager2 *iface, REFGUID guid, IWMProfile **ret)
 
static HRESULT WINAPI WMProfileManager_LoadProfileByData (IWMProfileManager2 *iface, const WCHAR *profile, IWMProfile **ret)
 
static HRESULT WINAPI WMProfileManager_SaveProfile (IWMProfileManager2 *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
 
static HRESULT WINAPI WMProfileManager_GetSystemProfileCount (IWMProfileManager2 *iface, DWORD *ret)
 
static HRESULT WINAPI WMProfileManager_LoadSystemProfile (IWMProfileManager2 *iface, DWORD index, IWMProfile **ret)
 
static HRESULT WINAPI WMProfileManager2_GetSystemProfileVersion (IWMProfileManager2 *iface, WMT_VERSION *version)
 
static HRESULT WINAPI WMProfileManager2_SetSystemProfileVersion (IWMProfileManager2 *iface, WMT_VERSION version)
 
HRESULT WINAPI WMCreateProfileManager (IWMProfileManager **ret)
 

Variables

static const IWMProfileManager2Vtbl WMProfileManager2Vtbl
 

Function Documentation

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 28 of file wmvcore_main.c.

29 {
30  TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
31 
32  switch (fdwReason)
33  {
34  case DLL_WINE_PREATTACH:
35  return FALSE; /* prefer native version */
36  case DLL_PROCESS_ATTACH:
37  DisableThreadLibraryCalls(hinstDLL);
38  break;
39  }
40 
41  return TRUE;
42 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
static IN DWORD IN LPVOID lpvReserved
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 44 of file wmvcore_main.c.

45 {
46  FIXME("(): stub\n");
47 
48  return S_OK;
49 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:51

◆ impl_from_IWMProfileManager2()

static WMProfileManager* impl_from_IWMProfileManager2 ( IWMProfileManager2 iface)
inlinestatic

Definition at line 94 of file wmvcore_main.c.

95 {
96  return CONTAINING_RECORD(iface, WMProfileManager, IWMProfileManager2_iface);
97 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by WMProfileManager2_GetSystemProfileVersion(), WMProfileManager2_SetSystemProfileVersion(), WMProfileManager_AddRef(), WMProfileManager_CreateEmptyProfile(), WMProfileManager_GetSystemProfileCount(), WMProfileManager_LoadProfileByData(), WMProfileManager_LoadProfileByID(), WMProfileManager_LoadSystemProfile(), WMProfileManager_QueryInterface(), WMProfileManager_Release(), and WMProfileManager_SaveProfile().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wmvcore  )

◆ WMCheckURLExtension()

HRESULT WINAPI WMCheckURLExtension ( const WCHAR url)

Definition at line 51 of file wmvcore_main.c.

52 {
53  FIXME("(%s): stub\n", wine_dbgstr_w(url));
54 
55  if (!url)
56  return E_INVALIDARG;
57 
58  return NS_E_INVALID_NAME;
59 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
#define NS_E_INVALID_NAME
Definition: nserror.h:65
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR url[]
Definition: encode.c:1432

Referenced by test_urlextension().

◆ WMCheckURLScheme()

HRESULT WINAPI WMCheckURLScheme ( const WCHAR scheme)

Definition at line 61 of file wmvcore_main.c.

62 {
63  FIXME("(%s): stub\n", wine_dbgstr_w(scheme));
64 
65  return NS_E_INVALID_NAME;
66 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
DWORD scheme
#define NS_E_INVALID_NAME
Definition: nserror.h:65
#define FIXME(fmt,...)
Definition: debug.h:111

◆ WMCreateBackupRestorer()

HRESULT WINAPI WMCreateBackupRestorer ( IUnknown callback,
IWMLicenseBackup **  licBackup 
)

Definition at line 77 of file wmvcore_main.c.

78 {
79  FIXME("(%p %p): stub\n", callback, licBackup);
80 
81  if (!callback)
82  return E_INVALIDARG;
83 
84  *licBackup = NULL;
85 
86  return E_NOTIMPL;
87 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMCreateEditor()

HRESULT WINAPI WMCreateEditor ( IWMMetadataEditor **  editor)

Definition at line 68 of file wmvcore_main.c.

69 {
70  FIXME("(%p): stub\n", editor);
71 
72  *editor = NULL;
73 
74  return E_NOTIMPL;
75 }
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMCreateProfileManager()

HRESULT WINAPI WMCreateProfileManager ( IWMProfileManager **  ret)

Definition at line 215 of file wmvcore_main.c.

216 {
217  WMProfileManager *profile_mgr;
218 
219  TRACE("(%p)\n", ret);
220 
221  profile_mgr = heap_alloc(sizeof(*profile_mgr));
222  if(!profile_mgr)
223  return E_OUTOFMEMORY;
224 
225  profile_mgr->IWMProfileManager2_iface.lpVtbl = &WMProfileManager2Vtbl;
226  profile_mgr->ref = 1;
227 
228  *ret = (IWMProfileManager *)&profile_mgr->IWMProfileManager2_iface;
229  return S_OK;
230 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
int ret
IWMProfileManager2 IWMProfileManager2_iface
Definition: wmvcore_main.c:90
#define S_OK
Definition: intsafe.h:51
static const IWMProfileManager2Vtbl WMProfileManager2Vtbl
Definition: wmvcore_main.c:201

Referenced by test_profile_manager_interfaces().

◆ WMProfileManager2_GetSystemProfileVersion()

static HRESULT WINAPI WMProfileManager2_GetSystemProfileVersion ( IWMProfileManager2 iface,
WMT_VERSION version 
)
static

Definition at line 187 of file wmvcore_main.c.

188 {
190  FIXME("(%p)->(%p)\n", This, version);
191  return E_NOTIMPL;
192 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
static const WCHAR version[]
Definition: asmname.c:66
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMProfileManager2_SetSystemProfileVersion()

static HRESULT WINAPI WMProfileManager2_SetSystemProfileVersion ( IWMProfileManager2 iface,
WMT_VERSION  version 
)
static

Definition at line 194 of file wmvcore_main.c.

195 {
197  FIXME("(%p)->(%x)\n", This, version);
198  return E_NOTIMPL;
199 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
static const WCHAR version[]
Definition: asmname.c:66
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMProfileManager_AddRef()

static ULONG WINAPI WMProfileManager_AddRef ( IWMProfileManager2 iface)
static

Definition at line 122 of file wmvcore_main.c.

123 {
126 
127  TRACE("(%p) ref=%d\n", This, ref);
128 
129  return ref;
130 }
Definition: send.c:48
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ WMProfileManager_CreateEmptyProfile()

static HRESULT WINAPI WMProfileManager_CreateEmptyProfile ( IWMProfileManager2 iface,
WMT_VERSION  version,
IWMProfile **  ret 
)
static

Definition at line 145 of file wmvcore_main.c.

146 {
148  FIXME("(%p)->(%x %p)\n", This, version, ret);
149  return E_NOTIMPL;
150 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
static const WCHAR version[]
Definition: asmname.c:66
int ret
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMProfileManager_GetSystemProfileCount()

static HRESULT WINAPI WMProfileManager_GetSystemProfileCount ( IWMProfileManager2 iface,
DWORD ret 
)
static

Definition at line 173 of file wmvcore_main.c.

174 {
176  FIXME("(%p)->(%p)\n", This, ret);
177  return E_NOTIMPL;
178 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
int ret
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMProfileManager_LoadProfileByData()

static HRESULT WINAPI WMProfileManager_LoadProfileByData ( IWMProfileManager2 iface,
const WCHAR profile,
IWMProfile **  ret 
)
static

Definition at line 159 of file wmvcore_main.c.

160 {
162  FIXME("(%p)->(%s %p)\n", This, debugstr_w(profile), ret);
163  return E_NOTIMPL;
164 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
int ret
#define E_NOTIMPL
Definition: ddrawi.h:99
#define profile
Definition: kernel32.h:12

◆ WMProfileManager_LoadProfileByID()

static HRESULT WINAPI WMProfileManager_LoadProfileByID ( IWMProfileManager2 iface,
REFGUID  guid,
IWMProfile **  ret 
)
static

Definition at line 152 of file wmvcore_main.c.

153 {
155  FIXME("(%p)->(%s %p)\n", This, debugstr_guid(guid), ret);
156  return E_NOTIMPL;
157 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
const GUID * guid
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
int ret
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMProfileManager_LoadSystemProfile()

static HRESULT WINAPI WMProfileManager_LoadSystemProfile ( IWMProfileManager2 iface,
DWORD  index,
IWMProfile **  ret 
)
static

Definition at line 180 of file wmvcore_main.c.

181 {
183  FIXME("(%p)->(%d %p)\n", This, index, ret);
184  return E_NOTIMPL;
185 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
GLuint index
Definition: glext.h:6031
int ret
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ WMProfileManager_QueryInterface()

static HRESULT WINAPI WMProfileManager_QueryInterface ( IWMProfileManager2 iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 99 of file wmvcore_main.c.

100 {
102 
103  if(IsEqualGUID(&IID_IUnknown, riid)) {
104  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
105  *ppv = &This->IWMProfileManager2_iface;
106  }else if(IsEqualGUID(&IID_IWMProfileManager, riid)) {
107  TRACE("(%p)->(IID_IWMProfileManager %p)\n", This, ppv);
108  *ppv = &This->IWMProfileManager2_iface;
109  }else if(IsEqualGUID(&IID_IWMProfileManager2, riid)) {
110  TRACE("(%p)->(IID_IWMProfileManager2 %p)\n", This, ppv);
111  *ppv = &This->IWMProfileManager2_iface;
112  }else {
113  FIXME("Unsupported iface %s\n", debugstr_guid(riid));
114  *ppv = NULL;
115  return E_NOINTERFACE;
116  }
117 
118  IUnknown_AddRef((IUnknown*)*ppv);
119  return S_OK;
120 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ WMProfileManager_Release()

static ULONG WINAPI WMProfileManager_Release ( IWMProfileManager2 iface)
static

Definition at line 132 of file wmvcore_main.c.

133 {
136 
137  TRACE("(%p) ref=%d\n", This, ref);
138 
139  if(!ref)
140  heap_free(This);
141 
142  return ref;
143 }
Definition: send.c:48
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ WMProfileManager_SaveProfile()

static HRESULT WINAPI WMProfileManager_SaveProfile ( IWMProfileManager2 iface,
IWMProfile profile,
WCHAR profile_str,
DWORD len 
)
static

Definition at line 166 of file wmvcore_main.c.

167 {
169  FIXME("(%p)->(%p %p %p)\n", This, profile, profile_str, len);
170  return E_NOTIMPL;
171 }
static WMProfileManager * impl_from_IWMProfileManager2(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:94
#define FIXME(fmt,...)
Definition: debug.h:111
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOTIMPL
Definition: ddrawi.h:99
#define profile
Definition: kernel32.h:12

Variable Documentation

◆ WMProfileManager2Vtbl

const IWMProfileManager2Vtbl WMProfileManager2Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI WMProfileManager_QueryInterface(IWMProfileManager2 *iface, REFIID riid, void **ppv)
Definition: wmvcore_main.c:99
static HRESULT WINAPI WMProfileManager2_GetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION *version)
Definition: wmvcore_main.c:187
static HRESULT WINAPI WMProfileManager_GetSystemProfileCount(IWMProfileManager2 *iface, DWORD *ret)
Definition: wmvcore_main.c:173
static HRESULT WINAPI WMProfileManager_LoadProfileByID(IWMProfileManager2 *iface, REFGUID guid, IWMProfile **ret)
Definition: wmvcore_main.c:152
static ULONG WINAPI WMProfileManager_Release(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:132
static ULONG WINAPI WMProfileManager_AddRef(IWMProfileManager2 *iface)
Definition: wmvcore_main.c:122
static HRESULT WINAPI WMProfileManager_LoadProfileByData(IWMProfileManager2 *iface, const WCHAR *profile, IWMProfile **ret)
Definition: wmvcore_main.c:159
static HRESULT WINAPI WMProfileManager_SaveProfile(IWMProfileManager2 *iface, IWMProfile *profile, WCHAR *profile_str, DWORD *len)
Definition: wmvcore_main.c:166
static HRESULT WINAPI WMProfileManager2_SetSystemProfileVersion(IWMProfileManager2 *iface, WMT_VERSION version)
Definition: wmvcore_main.c:194
static HRESULT WINAPI WMProfileManager_CreateEmptyProfile(IWMProfileManager2 *iface, WMT_VERSION version, IWMProfile **ret)
Definition: wmvcore_main.c:145
static HRESULT WINAPI WMProfileManager_LoadSystemProfile(IWMProfileManager2 *iface, DWORD index, IWMProfile **ret)
Definition: wmvcore_main.c:180

Definition at line 201 of file wmvcore_main.c.

Referenced by WMCreateProfileManager().