Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c5b4c8e8
Commit
c5b4c8e8
authored
Mar 10, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmvcore: Added WMCreateProfileManager implementation.
parent
430b7c9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
1 deletion
+137
-1
wmvcore.spec
dlls/wmvcore/wmvcore.spec
+1
-1
wmvcore_main.c
dlls/wmvcore/wmvcore_main.c
+136
-0
No files found.
dlls/wmvcore/wmvcore.spec
View file @
c5b4c8e8
...
...
@@ -8,7 +8,7 @@
@ stub WMCreateBackupRestorer
@ stdcall WMCreateEditor(ptr)
@ stub WMCreateIndexer
@ st
ub WMCreateProfileManager
@ st
dcall WMCreateProfileManager(ptr)
@ stdcall WMCreateReader(ptr long ptr)
@ stub WMCreateReaderPriv
@ stdcall WMCreateSyncReader(ptr long ptr)
...
...
dlls/wmvcore/wmvcore_main.c
View file @
c5b4c8e8
...
...
@@ -20,13 +20,26 @@
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "initguid.h"
#include "wmsdkidl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wmvcore
);
static
inline
void
*
heap_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
BOOL
heap_free
(
void
*
mem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"(0x%p, %d, %p)
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
...
...
@@ -76,3 +89,126 @@ HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader *
return
E_NOTIMPL
;
}
typedef
struct
{
IWMProfileManager
IWMProfileManager_iface
;
LONG
ref
;
}
WMProfileManager
;
static
inline
WMProfileManager
*
impl_from_IWMProfileManager
(
IWMProfileManager
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
WMProfileManager
,
IWMProfileManager_iface
);
}
static
HRESULT
WINAPI
WMProfileManager_QueryInterface
(
IWMProfileManager
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IWMProfileManager_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IWMProfileManager
,
riid
))
{
TRACE
(
"(%p)->(IID_IWMProfileManager %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IWMProfileManager_iface
;
}
else
{
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
WMProfileManager_AddRef
(
IWMProfileManager
*
iface
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
WMProfileManager_Release
(
IWMProfileManager
*
iface
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
heap_free
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
WMProfileManager_CreateEmptyProfile
(
IWMProfileManager
*
iface
,
WMT_VERSION
version
,
IWMProfile
**
ret
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
FIXME
(
"(%p)->(%x %p)
\n
"
,
This
,
version
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WMProfileManager_LoadProfileByID
(
IWMProfileManager
*
iface
,
REFGUID
guid
,
IWMProfile
**
ret
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
guid
),
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WMProfileManager_LoadProfileByData
(
IWMProfileManager
*
iface
,
const
WCHAR
*
profile
,
IWMProfile
**
ret
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
profile
),
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WMProfileManager_SaveProfile
(
IWMProfileManager
*
iface
,
IWMProfile
*
profile
,
WCHAR
*
profile_str
,
DWORD
*
len
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
FIXME
(
"(%p)->(%p %p %p)
\n
"
,
This
,
profile
,
profile_str
,
len
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WMProfileManager_GetSystemProfileCount
(
IWMProfileManager
*
iface
,
DWORD
*
ret
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WMProfileManager_LoadSystemProfile
(
IWMProfileManager
*
iface
,
DWORD
index
,
IWMProfile
**
ret
)
{
WMProfileManager
*
This
=
impl_from_IWMProfileManager
(
iface
);
FIXME
(
"(%p)->(%d %p)
\n
"
,
This
,
index
,
ret
);
return
E_NOTIMPL
;
}
static
const
IWMProfileManagerVtbl
WMProfileManagerVtbl
=
{
WMProfileManager_QueryInterface
,
WMProfileManager_AddRef
,
WMProfileManager_Release
,
WMProfileManager_CreateEmptyProfile
,
WMProfileManager_LoadProfileByID
,
WMProfileManager_LoadProfileByData
,
WMProfileManager_SaveProfile
,
WMProfileManager_GetSystemProfileCount
,
WMProfileManager_LoadSystemProfile
};
HRESULT
WINAPI
WMCreateProfileManager
(
IWMProfileManager
**
ret
)
{
WMProfileManager
*
profile_mgr
;
TRACE
(
"(%p)
\n
"
,
ret
);
profile_mgr
=
heap_alloc
(
sizeof
(
*
profile_mgr
));
if
(
!
profile_mgr
)
return
E_OUTOFMEMORY
;
profile_mgr
->
IWMProfileManager_iface
.
lpVtbl
=
&
WMProfileManagerVtbl
;
profile_mgr
->
ref
=
1
;
*
ret
=
&
profile_mgr
->
IWMProfileManager_iface
;
return
S_OK
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment