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
fd513acf
Commit
fd513acf
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 IDxDiagContainer iface.
parent
a7f02040
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
24 deletions
+44
-24
container.c
dlls/dxdiagn/container.c
+42
-20
dxdiag_private.h
dlls/dxdiagn/dxdiag_private.h
+2
-4
No files found.
dlls/dxdiagn/container.c
View file @
fd513acf
...
...
@@ -28,10 +28,16 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dxdiag
);
static
inline
IDxDiagContainerImpl
*
impl_from_IDxDiagContainer
(
IDxDiagContainer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDxDiagContainerImpl
,
IDxDiagContainer_iface
);
}
/* IDxDiagContainer IUnknown parts follow: */
static
HRESULT
WINAPI
IDxDiagContainerImpl_QueryInterface
(
PDXDIAGCONTAINER
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IDxDiagContainerImpl_QueryInterface
(
IDxDiagContainer
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
)
;
if
(
!
ppobj
)
return
E_INVALIDARG
;
...
...
@@ -47,8 +53,9 @@ static HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDxDiagContainerImpl_AddRef
(
PDXDIAGCONTAINER
iface
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
ULONG
WINAPI
IDxDiagContainerImpl_AddRef
(
IDxDiagContainer
*
iface
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -58,8 +65,9 @@ static ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface) {
return
refCount
;
}
static
ULONG
WINAPI
IDxDiagContainerImpl_Release
(
PDXDIAGCONTAINER
iface
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
ULONG
WINAPI
IDxDiagContainerImpl_Release
(
IDxDiagContainer
*
iface
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -75,8 +83,11 @@ static ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface) {
}
/* IDxDiagContainer Interface follow: */
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetNumberOfChildContainers
(
PDXDIAGCONTAINER
iface
,
DWORD
*
pdwCount
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetNumberOfChildContainers
(
IDxDiagContainer
*
iface
,
DWORD
*
pdwCount
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
TRACE
(
"(%p)
\n
"
,
iface
);
if
(
NULL
==
pdwCount
)
{
return
E_INVALIDARG
;
...
...
@@ -85,8 +96,10 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCON
return
S_OK
;
}
static
HRESULT
WINAPI
IDxDiagContainerImpl_EnumChildContainerNames
(
PDXDIAGCONTAINER
iface
,
DWORD
dwIndex
,
LPWSTR
pwszContainer
,
DWORD
cchContainer
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
HRESULT
WINAPI
IDxDiagContainerImpl_EnumChildContainerNames
(
IDxDiagContainer
*
iface
,
DWORD
dwIndex
,
LPWSTR
pwszContainer
,
DWORD
cchContainer
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
IDxDiagContainerImpl_Container
*
p
;
DWORD
i
=
0
;
...
...
@@ -126,8 +139,10 @@ static HRESULT IDxDiagContainerImpl_GetChildContainerInternal(IDxDiagContainerIm
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetChildContainer
(
PDXDIAGCONTAINER
iface
,
LPCWSTR
pwszContainer
,
IDxDiagContainer
**
ppInstance
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetChildContainer
(
IDxDiagContainer
*
iface
,
LPCWSTR
pwszContainer
,
IDxDiagContainer
**
ppInstance
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
IDxDiagContainerImpl_Container
*
pContainer
=
This
->
cont
;
LPWSTR
tmp
,
orig_tmp
;
INT
tmp_len
;
...
...
@@ -173,8 +188,11 @@ on_error:
return
hr
;
}
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetNumberOfProps
(
PDXDIAGCONTAINER
iface
,
DWORD
*
pdwCount
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetNumberOfProps
(
IDxDiagContainer
*
iface
,
DWORD
*
pdwCount
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
TRACE
(
"(%p)
\n
"
,
iface
);
if
(
NULL
==
pdwCount
)
{
return
E_INVALIDARG
;
...
...
@@ -183,8 +201,10 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER ifa
return
S_OK
;
}
static
HRESULT
WINAPI
IDxDiagContainerImpl_EnumPropNames
(
PDXDIAGCONTAINER
iface
,
DWORD
dwIndex
,
LPWSTR
pwszPropName
,
DWORD
cchPropName
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
HRESULT
WINAPI
IDxDiagContainerImpl_EnumPropNames
(
IDxDiagContainer
*
iface
,
DWORD
dwIndex
,
LPWSTR
pwszPropName
,
DWORD
cchPropName
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
IDxDiagContainerImpl_Property
*
p
;
DWORD
i
=
0
;
...
...
@@ -209,8 +229,10 @@ static HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface,
return
E_INVALIDARG
;
}
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetProp
(
PDXDIAGCONTAINER
iface
,
LPCWSTR
pwszPropName
,
VARIANT
*
pvarProp
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
static
HRESULT
WINAPI
IDxDiagContainerImpl_GetProp
(
IDxDiagContainer
*
iface
,
LPCWSTR
pwszPropName
,
VARIANT
*
pvarProp
)
{
IDxDiagContainerImpl
*
This
=
impl_from_IDxDiagContainer
(
iface
);
IDxDiagContainerImpl_Property
*
p
;
TRACE
(
"(%p, %s, %p)
\n
"
,
iface
,
debugstr_w
(
pwszPropName
),
pvarProp
);
...
...
@@ -254,10 +276,10 @@ HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, IDxDiagContainerImpl_Container
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
container
->
lpVtbl
=
&
DxDiagContainer_Vtbl
;
container
->
IDxDiagContainer_iface
.
lpVtbl
=
&
DxDiagContainer_Vtbl
;
container
->
ref
=
0
;
/* will be inited with QueryInterface */
container
->
cont
=
cont
;
container
->
pProv
=
pProv
;
IDxDiagProvider_AddRef
(
pProv
);
return
IDxDiagContainerImpl_QueryInterface
(
(
PDXDIAGCONTAINER
)
container
,
riid
,
ppobj
);
return
IDxDiagContainerImpl_QueryInterface
(
&
container
->
IDxDiagContainer_iface
,
riid
,
ppobj
);
}
dlls/dxdiagn/dxdiag_private.h
View file @
fd513acf
...
...
@@ -61,10 +61,8 @@ typedef struct IDxDiagContainerImpl_Property {
* IDxDiagContainer implementation structure
*/
struct
IDxDiagContainerImpl
{
/* IUnknown fields */
const
IDxDiagContainerVtbl
*
lpVtbl
;
LONG
ref
;
/* IDxDiagContainer fields */
IDxDiagContainer
IDxDiagContainer_iface
;
LONG
ref
;
IDxDiagContainerImpl_Container
*
cont
;
IDxDiagProvider
*
pProv
;
};
...
...
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