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
1b978ead
Commit
1b978ead
authored
Oct 04, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Oct 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: Return the path from IAssemblyCacheImpl_QueryAssemblyInfo.
parent
bb4ba699
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
113 additions
and
61 deletions
+113
-61
asmcache.c
dlls/fusion/asmcache.c
+2
-0
asmenum.c
dlls/fusion/asmenum.c
+15
-6
asmname.c
dlls/fusion/asmname.c
+41
-0
fusionpriv.h
dlls/fusion/fusionpriv.h
+3
-0
asmcache.c
dlls/fusion/tests/asmcache.c
+52
-55
No files found.
dlls/fusion/asmcache.c
View file @
1b978ead
...
...
@@ -223,6 +223,8 @@ static HRESULT WINAPI IAssemblyCacheImpl_QueryAssemblyInfo(IAssemblyCache *iface
if
(
!
pAsmInfo
)
goto
done
;
hr
=
IAssemblyName_GetPath
(
next
,
pAsmInfo
->
pszCurrentAssemblyPathBuf
,
&
pAsmInfo
->
cchBuf
);
pAsmInfo
->
dwAssemblyFlags
=
ASSEMBLYINFO_FLAG_INSTALLED
;
done:
...
...
dlls/fusion/asmenum.c
View file @
1b978ead
...
...
@@ -287,6 +287,7 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
WIN32_FIND_DATAW
ffd
;
WCHAR
buf
[
MAX_PATH
];
WCHAR
disp
[
MAX_PATH
];
WCHAR
asmpath
[
MAX_PATH
];
ASMNAME
*
asmname
;
HANDLE
hfind
;
LPWSTR
ptr
;
...
...
@@ -297,9 +298,9 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
static
const
WCHAR
dot
[]
=
{
'.'
,
0
};
static
const
WCHAR
dotdot
[]
=
{
'.'
,
'.'
,
0
};
static
const
WCHAR
search_fmt
[]
=
{
'%'
,
's'
,
'\\'
,
'*'
,
0
};
static
const
WCHAR
parent_fmt
[]
=
{
'%'
,
's'
,
','
,
' '
,
0
};
static
const
WCHAR
dblunder
[]
=
{
'_'
,
'_'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'='
,
'%'
,
's'
,
','
,
' '
,
static
const
WCHAR
path_fmt
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
fmt
[]
=
{
'%'
,
's'
,
','
,
' '
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'='
,
'%'
,
's'
,
','
,
' '
,
'C'
,
'u'
,
'l'
,
't'
,
'u'
,
'r'
,
'e'
,
'='
,
'n'
,
'e'
,
'u'
,
't'
,
'r'
,
'a'
,
'l'
,
','
,
' '
,
'P'
,
'u'
,
'b'
,
'l'
,
'i'
,
'c'
,
'K'
,
'e'
,
'y'
,
'T'
,
'o'
,
'k'
,
'e'
,
'n'
,
'='
,
'%'
,
's'
,
0
};
static
const
WCHAR
ss_fmt
[]
=
{
'%'
,
's'
,
'\\'
,
'%'
,
's'
,
0
};
...
...
@@ -325,17 +326,17 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
else
ptr
=
ffd
.
cFileName
;
sprintfW
(
parent
,
parent_fm
t
,
ptr
);
lstrcpyW
(
paren
t
,
ptr
);
}
else
if
(
depth
==
1
)
{
sprintfW
(
asmpath
,
path_fmt
,
path
,
ffd
.
cFileName
,
parent
);
ptr
=
strstrW
(
ffd
.
cFileName
,
dblunder
);
*
ptr
=
'\0'
;
ptr
+=
2
;
sprintfW
(
buf
,
fmt
,
ffd
.
cFileName
,
ptr
);
lstrcpyW
(
disp
,
parent
);
lstrcatW
(
disp
,
buf
);
sprintfW
(
disp
,
fmt
,
parent
,
ffd
.
cFileName
,
ptr
);
asmname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ASMNAME
));
if
(
!
asmname
)
...
...
@@ -352,6 +353,14 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
break
;
}
hr
=
IAssemblyName_SetPath
(
asmname
->
name
,
asmpath
);
if
(
FAILED
(
hr
))
{
IAssemblyName_Release
(
asmname
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
asmname
);
break
;
}
insert_assembly
(
assemblies
,
asmname
);
continue
;
}
...
...
dlls/fusion/asmname.c
View file @
1b978ead
...
...
@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <assert.h>
#define COBJMACROS
#define INITGUID
...
...
@@ -40,6 +41,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(fusion);
typedef
struct
{
const
IAssemblyNameVtbl
*
lpIAssemblyNameVtbl
;
LPWSTR
path
;
LPWSTR
displayname
;
LPWSTR
name
;
LPWSTR
culture
;
...
...
@@ -104,6 +107,7 @@ static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface)
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
path
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
displayname
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
culture
);
...
...
@@ -425,6 +429,43 @@ static const IAssemblyNameVtbl AssemblyNameVtbl = {
IAssemblyNameImpl_Clone
};
/* Internal methods */
HRESULT
IAssemblyName_SetPath
(
IAssemblyName
*
iface
,
LPCWSTR
path
)
{
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
assert
(
name
->
lpIAssemblyNameVtbl
==
&
AssemblyNameVtbl
);
name
->
path
=
strdupW
(
path
);
if
(
!
name
->
path
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
HRESULT
IAssemblyName_GetPath
(
IAssemblyName
*
iface
,
LPWSTR
buf
,
ULONG
*
len
)
{
ULONG
buffer_size
=
*
len
;
IAssemblyNameImpl
*
name
=
(
IAssemblyNameImpl
*
)
iface
;
assert
(
name
->
lpIAssemblyNameVtbl
==
&
AssemblyNameVtbl
);
if
(
!
name
->
path
)
return
S_OK
;
if
(
!
buf
)
buffer_size
=
0
;
*
len
=
lstrlenW
(
name
->
path
)
+
1
;
if
(
*
len
<=
buffer_size
)
lstrcpyW
(
buf
,
name
->
path
);
else
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
return
S_OK
;
}
static
HRESULT
parse_version
(
IAssemblyNameImpl
*
name
,
LPWSTR
version
)
{
LPWSTR
beg
,
end
;
...
...
dlls/fusion/fusionpriv.h
View file @
1b978ead
...
...
@@ -436,6 +436,9 @@ HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version);
BYTE
assembly_get_architecture
(
ASSEMBLY
*
assembly
);
HRESULT
assembly_get_pubkey_token
(
ASSEMBLY
*
assembly
,
LPWSTR
*
token
);
extern
HRESULT
IAssemblyName_SetPath
(
IAssemblyName
*
iface
,
LPCWSTR
path
);
extern
HRESULT
IAssemblyName_GetPath
(
IAssemblyName
*
iface
,
LPWSTR
buf
,
ULONG
*
len
);
static
inline
LPWSTR
strdupW
(
LPCWSTR
src
)
{
LPWSTR
dest
;
...
...
dlls/fusion/tests/asmcache.c
View file @
1b978ead
This diff is collapsed.
Click to expand it.
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