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
b5a103d2
Commit
b5a103d2
authored
Jun 01, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: COM cleanup for the IAssemblyName iface.
parent
7f39b9e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
asmname.c
dlls/fusion/asmname.c
+24
-16
No files found.
dlls/fusion/asmname.c
View file @
b5a103d2
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
fusion
);
WINE_DEFAULT_DEBUG_CHANNEL
(
fusion
);
typedef
struct
{
typedef
struct
{
const
IAssemblyNameVtbl
*
lpIAssemblyNameVtbl
;
IAssemblyName
IAssemblyName_iface
;
LPWSTR
path
;
LPWSTR
path
;
...
@@ -67,10 +67,15 @@ static const WCHAR procarch[] = {'p','r','o','c','e','s','s','o','r',
...
@@ -67,10 +67,15 @@ static const WCHAR procarch[] = {'p','r','o','c','e','s','s','o','r',
#define CHARS_PER_PUBKEY 16
#define CHARS_PER_PUBKEY 16
static
inline
IAssemblyNameImpl
*
impl_from_IAssemblyName
(
IAssemblyName
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IAssemblyNameImpl
,
IAssemblyName_iface
);
}
static
HRESULT
WINAPI
IAssemblyNameImpl_QueryInterface
(
IAssemblyName
*
iface
,
static
HRESULT
WINAPI
IAssemblyNameImpl_QueryInterface
(
IAssemblyName
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IAssemblyNameImpl
*
This
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
This
=
impl_from_IAssemblyName
(
iface
)
;
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
...
@@ -90,7 +95,7 @@ static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface,
...
@@ -90,7 +95,7 @@ static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface,
static
ULONG
WINAPI
IAssemblyNameImpl_AddRef
(
IAssemblyName
*
iface
)
static
ULONG
WINAPI
IAssemblyNameImpl_AddRef
(
IAssemblyName
*
iface
)
{
{
IAssemblyNameImpl
*
This
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
This
=
impl_from_IAssemblyName
(
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
);
...
@@ -100,7 +105,7 @@ static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
...
@@ -100,7 +105,7 @@ static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
static
ULONG
WINAPI
IAssemblyNameImpl_Release
(
IAssemblyName
*
iface
)
static
ULONG
WINAPI
IAssemblyNameImpl_Release
(
IAssemblyName
*
iface
)
{
{
IAssemblyNameImpl
*
This
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
This
=
impl_from_IAssemblyName
(
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
);
...
@@ -132,7 +137,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface,
...
@@ -132,7 +137,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface,
LPVOID
pvProperty
,
LPVOID
pvProperty
,
LPDWORD
pcbProperty
)
LPDWORD
pcbProperty
)
{
{
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
name
=
impl_from_IAssemblyName
(
iface
)
;
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
iface
,
PropertyId
,
pvProperty
,
pcbProperty
);
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
iface
,
PropertyId
,
pvProperty
,
pcbProperty
);
...
@@ -223,7 +228,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
...
@@ -223,7 +228,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
LPDWORD
pccDisplayName
,
LPDWORD
pccDisplayName
,
DWORD
dwDisplayFlags
)
DWORD
dwDisplayFlags
)
{
{
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
name
=
impl_from_IAssemblyName
(
iface
)
;
WCHAR
verstr
[
30
];
WCHAR
verstr
[
30
];
DWORD
size
;
DWORD
size
;
LPWSTR
cultureval
=
0
;
LPWSTR
cultureval
=
0
;
...
@@ -363,7 +368,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
...
@@ -363,7 +368,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
LPDWORD
lpcwBuffer
,
LPDWORD
lpcwBuffer
,
WCHAR
*
pwzName
)
WCHAR
*
pwzName
)
{
{
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
name
=
impl_from_IAssemblyName
(
iface
)
;
TRACE
(
"(%p, %p, %p)
\n
"
,
iface
,
lpcwBuffer
,
pwzName
);
TRACE
(
"(%p, %p, %p)
\n
"
,
iface
,
lpcwBuffer
,
pwzName
);
...
@@ -384,7 +389,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface,
...
@@ -384,7 +389,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface,
LPDWORD
pdwVersionHi
,
LPDWORD
pdwVersionHi
,
LPDWORD
pdwVersionLow
)
LPDWORD
pdwVersionLow
)
{
{
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
name
=
impl_from_IAssemblyName
(
iface
)
;
TRACE
(
"(%p, %p, %p)
\n
"
,
iface
,
pdwVersionHi
,
pdwVersionLow
);
TRACE
(
"(%p, %p, %p)
\n
"
,
iface
,
pdwVersionHi
,
pdwVersionLow
);
...
@@ -431,11 +436,16 @@ static const IAssemblyNameVtbl AssemblyNameVtbl = {
...
@@ -431,11 +436,16 @@ static const IAssemblyNameVtbl AssemblyNameVtbl = {
};
};
/* Internal methods */
/* Internal methods */
HRESULT
IAssemblyName_SetPath
(
IAssemblyName
*
iface
,
LPCWSTR
path
)
static
inline
IAssemblyNameImpl
*
unsafe_impl_from_IAssemblyName
(
IAssemblyName
*
iface
)
{
{
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
assert
(
iface
->
lpVtbl
==
&
AssemblyNameVtbl
)
;
assert
(
name
->
lpIAssemblyNameVtbl
==
&
AssemblyNameVtbl
);
return
impl_from_IAssemblyName
(
iface
);
}
HRESULT
IAssemblyName_SetPath
(
IAssemblyName
*
iface
,
LPCWSTR
path
)
{
IAssemblyNameImpl
*
name
=
unsafe_impl_from_IAssemblyName
(
iface
);
name
->
path
=
strdupW
(
path
);
name
->
path
=
strdupW
(
path
);
if
(
!
name
->
path
)
if
(
!
name
->
path
)
...
@@ -447,9 +457,7 @@ HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path)
...
@@ -447,9 +457,7 @@ HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path)
HRESULT
IAssemblyName_GetPath
(
IAssemblyName
*
iface
,
LPWSTR
buf
,
ULONG
*
len
)
HRESULT
IAssemblyName_GetPath
(
IAssemblyName
*
iface
,
LPWSTR
buf
,
ULONG
*
len
)
{
{
ULONG
buffer_size
=
*
len
;
ULONG
buffer_size
=
*
len
;
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
IAssemblyNameImpl
*
name
=
unsafe_impl_from_IAssemblyName
(
iface
);
assert
(
name
->
lpIAssemblyNameVtbl
==
&
AssemblyNameVtbl
);
if
(
!
name
->
path
)
if
(
!
name
->
path
)
return
S_OK
;
return
S_OK
;
...
@@ -672,7 +680,7 @@ HRESULT WINAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj,
...
@@ -672,7 +680,7 @@ HRESULT WINAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj,
if
(
!
name
)
if
(
!
name
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
name
->
lpIAssemblyName
Vtbl
=
&
AssemblyNameVtbl
;
name
->
IAssemblyName_iface
.
lp
Vtbl
=
&
AssemblyNameVtbl
;
name
->
ref
=
1
;
name
->
ref
=
1
;
hr
=
parse_display_name
(
name
,
szAssemblyName
);
hr
=
parse_display_name
(
name
,
szAssemblyName
);
...
@@ -682,7 +690,7 @@ HRESULT WINAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj,
...
@@ -682,7 +690,7 @@ HRESULT WINAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj,
return
hr
;
return
hr
;
}
}
*
ppAssemblyNameObj
=
(
IAssemblyName
*
)
nam
e
;
*
ppAssemblyNameObj
=
&
name
->
IAssemblyName_ifac
e
;
return
S_OK
;
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