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
a7f02040
Commit
a7f02040
authored
Aug 10, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxdiagn: COM cleanup for the IDxDiagProvider iface.
parent
5f77ad40
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
30 deletions
+34
-30
dxdiag_private.h
dlls/dxdiagn/dxdiag_private.h
+0
-17
provider.c
dlls/dxdiagn/provider.c
+34
-13
No files found.
dlls/dxdiagn/dxdiag_private.h
View file @
a7f02040
...
@@ -37,23 +37,6 @@ typedef struct IDxDiagContainerImpl IDxDiagContainerImpl;
...
@@ -37,23 +37,6 @@ typedef struct IDxDiagContainerImpl IDxDiagContainerImpl;
typedef
struct
IDxDiagContainerImpl_Container
IDxDiagContainerImpl_Container
;
typedef
struct
IDxDiagContainerImpl_Container
IDxDiagContainerImpl_Container
;
/* ---------------- */
/* ---------------- */
/* IDxDiagProvider */
/* ---------------- */
/*****************************************************************************
* IDxDiagProvider implementation structure
*/
struct
IDxDiagProviderImpl
{
/* IUnknown fields */
const
IDxDiagProviderVtbl
*
lpVtbl
;
LONG
ref
;
/* IDxDiagProvider fields */
BOOL
init
;
DXDIAG_INIT_PARAMS
params
;
IDxDiagContainerImpl_Container
*
info_root
;
};
/* ---------------- */
/* IDxDiagContainer */
/* IDxDiagContainer */
/* ---------------- */
/* ---------------- */
...
...
dlls/dxdiagn/provider.c
View file @
a7f02040
...
@@ -67,10 +67,25 @@ static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I'
...
@@ -67,10 +67,25 @@ static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I'
static
const
WCHAR
dwRefreshRate
[]
=
{
'd'
,
'w'
,
'R'
,
'e'
,
'f'
,
'r'
,
'e'
,
's'
,
'h'
,
'R'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
dwRefreshRate
[]
=
{
'd'
,
'w'
,
'R'
,
'e'
,
'f'
,
'r'
,
'e'
,
's'
,
'h'
,
'R'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
szManufacturer
[]
=
{
's'
,
'z'
,
'M'
,
'a'
,
'n'
,
'u'
,
'f'
,
'a'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szManufacturer
[]
=
{
's'
,
'z'
,
'M'
,
'a'
,
'n'
,
'u'
,
'f'
,
'a'
,
'c'
,
't'
,
'u'
,
'r'
,
'e'
,
'r'
,
0
};
struct
IDxDiagProviderImpl
{
IDxDiagProvider
IDxDiagProvider_iface
;
LONG
ref
;
BOOL
init
;
DXDIAG_INIT_PARAMS
params
;
IDxDiagContainerImpl_Container
*
info_root
;
};
static
inline
IDxDiagProviderImpl
*
impl_from_IDxDiagProvider
(
IDxDiagProvider
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDxDiagProviderImpl
,
IDxDiagProvider_iface
);
}
/* IDxDiagProvider IUnknown parts follow: */
/* IDxDiagProvider IUnknown parts follow: */
static
HRESULT
WINAPI
IDxDiagProviderImpl_QueryInterface
(
PDXDIAGPROVIDER
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IDxDiagProviderImpl_QueryInterface
(
IDxDiagProvider
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
{
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
IDxDiagProviderImpl
*
This
=
impl_from_IDxDiagProvider
(
iface
)
;
if
(
!
ppobj
)
return
E_INVALIDARG
;
if
(
!
ppobj
)
return
E_INVALIDARG
;
...
@@ -86,8 +101,9 @@ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface,
...
@@ -86,8 +101,9 @@ static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface,
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
IDxDiagProviderImpl_AddRef
(
PDXDIAGPROVIDER
iface
)
{
static
ULONG
WINAPI
IDxDiagProviderImpl_AddRef
(
IDxDiagProvider
*
iface
)
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
{
IDxDiagProviderImpl
*
This
=
impl_from_IDxDiagProvider
(
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
-
1
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
-
1
);
...
@@ -97,8 +113,9 @@ static ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) {
...
@@ -97,8 +113,9 @@ static ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) {
return
refCount
;
return
refCount
;
}
}
static
ULONG
WINAPI
IDxDiagProviderImpl_Release
(
PDXDIAGPROVIDER
iface
)
{
static
ULONG
WINAPI
IDxDiagProviderImpl_Release
(
IDxDiagProvider
*
iface
)
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
{
IDxDiagProviderImpl
*
This
=
impl_from_IDxDiagProvider
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
...
@@ -114,8 +131,10 @@ static ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) {
...
@@ -114,8 +131,10 @@ static ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) {
}
}
/* IDxDiagProvider Interface follow: */
/* IDxDiagProvider Interface follow: */
static
HRESULT
WINAPI
IDxDiagProviderImpl_Initialize
(
PDXDIAGPROVIDER
iface
,
DXDIAG_INIT_PARAMS
*
pParams
)
{
static
HRESULT
WINAPI
IDxDiagProviderImpl_Initialize
(
IDxDiagProvider
*
iface
,
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
DXDIAG_INIT_PARAMS
*
pParams
)
{
IDxDiagProviderImpl
*
This
=
impl_from_IDxDiagProvider
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pParams
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
pParams
);
...
@@ -140,8 +159,10 @@ static HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDI
...
@@ -140,8 +159,10 @@ static HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDI
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
IDxDiagProviderImpl_GetRootContainer
(
PDXDIAGPROVIDER
iface
,
IDxDiagContainer
**
ppInstance
)
{
static
HRESULT
WINAPI
IDxDiagProviderImpl_GetRootContainer
(
IDxDiagProvider
*
iface
,
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
IDxDiagContainer
**
ppInstance
)
{
IDxDiagProviderImpl
*
This
=
impl_from_IDxDiagProvider
(
iface
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppInstance
);
TRACE
(
"(%p,%p)
\n
"
,
iface
,
ppInstance
);
...
@@ -150,7 +171,7 @@ static HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface
...
@@ -150,7 +171,7 @@ static HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface
}
}
return
DXDiag_CreateDXDiagContainer
(
&
IID_IDxDiagContainer
,
This
->
info_root
,
return
DXDiag_CreateDXDiagContainer
(
&
IID_IDxDiagContainer
,
This
->
info_root
,
(
IDxDiagProvider
*
)
This
,
(
void
**
)
ppInstance
);
&
This
->
IDxDiagProvider_iface
,
(
void
**
)
ppInstance
);
}
}
static
const
IDxDiagProviderVtbl
DxDiagProvider_Vtbl
=
static
const
IDxDiagProviderVtbl
DxDiagProvider_Vtbl
=
...
@@ -172,9 +193,9 @@ HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, R
...
@@ -172,9 +193,9 @@ HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, R
provider
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDxDiagProviderImpl
));
provider
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDxDiagProviderImpl
));
if
(
NULL
==
provider
)
return
E_OUTOFMEMORY
;
if
(
NULL
==
provider
)
return
E_OUTOFMEMORY
;
provider
->
lpVtbl
=
&
DxDiagProvider_Vtbl
;
provider
->
IDxDiagProvider_iface
.
lpVtbl
=
&
DxDiagProvider_Vtbl
;
provider
->
ref
=
0
;
/* will be inited with QueryInterface */
provider
->
ref
=
0
;
/* will be inited with QueryInterface */
return
IDxDiagProviderImpl_QueryInterface
((
PDXDIAGPROVIDER
)
provider
,
riid
,
ppobj
);
return
IDxDiagProviderImpl_QueryInterface
(
&
provider
->
IDxDiagProvider_iface
,
riid
,
ppobj
);
}
}
static
void
free_property_information
(
IDxDiagContainerImpl_Property
*
prop
)
static
void
free_property_information
(
IDxDiagContainerImpl_Property
*
prop
)
...
...
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