29 #include "wine/unicode.h" 48 static const WCHAR szFusion[] = {
'f',
'u',
's',
'i',
'o',
'n',
'.',
'd',
'l',
'l',0};
49 static const WCHAR szMscoree[] = {
'\\',
'm',
's',
'c',
'o',
'r',
'e',
'e',
'.',
'd',
'l',
'l',0};
50 static const WCHAR szSxs[] = {
's',
'x',
's',
'.',
'd',
'l',
'l',0};
51 static const WCHAR szVersion10[] = {
'v',
'1',
'.',
'0',
'.',
'3',
'7',
'0',
'5',0};
52 static const WCHAR szVersion11[] = {
'v',
'1',
'.',
'1',
'.',
'4',
'3',
'2',
'2',0};
53 static const WCHAR szVersion20[] = {
'v',
'2',
'.',
'0',
'.',
'5',
'0',
'7',
'2',
'7',0};
54 static const WCHAR szVersion40[] = {
'v',
'4',
'.',
'0',
'.',
'3',
'0',
'3',
'1',
'9',0};
59 if (!(pCreateAssemblyCacheSxs = (
void *)
GetProcAddress(
hsxs,
"CreateAssemblyCache" )))
74 if (!pLoadLibraryShim( szFusion, szVersion10,
NULL, &
hfusion10 ))
77 if (!pLoadLibraryShim( szFusion, szVersion11,
NULL, &
hfusion11 ))
80 if (!pLoadLibraryShim( szFusion, szVersion20,
NULL, &
hfusion20 ))
83 if (!pLoadLibraryShim( szFusion, szVersion40,
NULL, &
hfusion40 ))
109 IAssemblyCache_Release( package->
cache_sxs );
116 IAssemblyCache_Release( package->
cache_net[
i] );
120 pCreateAssemblyCacheNet10 =
NULL;
121 pCreateAssemblyCacheNet11 =
NULL;
122 pCreateAssemblyCacheNet20 =
NULL;
123 pCreateAssemblyCacheNet40 =
NULL;
141 'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
142 '`',
'M',
's',
'i',
'A',
's',
's',
'e',
'm',
'b',
'l',
'y',
'`',
' ',
143 'W',
'H',
'E',
'R',
'E',
' ',
'`',
'C',
'o',
'm',
'p',
'o',
'n',
'e',
'n',
't',
'_',
'`',
144 ' ',
'=',
' ',
'\'',
'%',
's',
'\'',0};
166 TRACE(
"component is a global assembly\n");
181 static const WCHAR fmtW[] = {
'%',
's',
'=',
'"',
'%',
's',
'"',0};
182 static const WCHAR nameW[] = {
'n',
'a',
'm',
'e',0};
198 static const WCHAR commaW[] = {
',',0};
199 static const WCHAR queryW[] = {
200 'S',
'E',
'L',
'E',
'C',
'T',
' ',
'*',
' ',
'F',
'R',
'O',
'M',
' ',
201 '`',
'M',
's',
'i',
'A',
's',
's',
'e',
'm',
'b',
'l',
'y',
'N',
'a',
'm',
'e',
'`',
' ',
202 'W',
'H',
'E',
'R',
'E',
' ',
'`',
'C',
'o',
'm',
'p',
'o',
'n',
'e',
'n',
't',
'_',
'`',
203 ' ',
'=',
' ',
'\'',
'%',
's',
'\'',0};
218 if (!
name.count)
goto done;
221 if (!
name.attrs)
goto done;
232 for (
i = 0;
i <
name.count;
i++)
235 if (
i <
name.count - 1)
strcatW( display_name, commaW );
258 hr = IAssemblyCache_QueryAssemblyInfo(
cache, 0, display_name, &
info );
263 TRACE(
"QueryAssemblyInfo returned 0x%08x\n",
hr);
277 hr = IAssemblyCache_QueryAssemblyInfo(
cache, 0, displayname, &
info );
282 hr = IAssemblyCache_QueryAssemblyInfo(
cache, 0, displayname, &
info );
289 return info.pszCurrentAssemblyPathBuf;
300 if (!pCreateAssemblyNameObject || !pCreateAssemblyEnum)
return NULL;
308 IAssemblyName_Release(
name );
313 IAssemblyName_Release(
name );
325 IAssemblyName_Release(
name );
333 static const WCHAR clr_version_v20[] = {
'v',
'2',
'.',
'0',
'.',
'5',
'0',
'7',
'2',
'7',0};
334 static const WCHAR clr_version_v40[] = {
'v',
'4',
'.',
'0',
'.',
'3',
'0',
'3',
'1',
'9',0};
373 TRACE(
"attributes %u\n",
a->attributes);
377 WARN(
"can't get display name\n");
405 if (
a->clr_version[
i])
414 TRACE(
"assembly is %s\n",
a->installed ?
"installed" :
"not installed");
464 WARN(
"no manifest\n");
510 if (
FAILED(
hr ))
WARN(
"failed to uninstall assembly 0x%08x\n",
hr);
522 if (
FAILED(
hr ))
WARN(
"failed to uninstall assembly 0x%08x\n",
hr);
550 static const WCHAR path_win32[] =
551 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
552 'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'W',
'i',
'n',
'3',
'2',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',0};
553 static const WCHAR path_dotnet[] =
554 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
555 'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',0};
556 static const WCHAR classes_path_win32[] =
557 {
'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'W',
'i',
'n',
'3',
'2',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',0};
558 static const WCHAR classes_path_dotnet[] =
559 {
'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',0};
566 if (win32)
path = classes_path_win32;
567 else path = classes_path_dotnet;
572 if (win32)
path = path_win32;
573 else path = path_dotnet;
620 static const WCHAR path_win32[] =
621 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
622 'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'W',
'i',
'n',
'3',
'2',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',
623 'G',
'l',
'o',
'b',
'a',
'l',0};
624 static const WCHAR path_dotnet[] =
625 {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
626 'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',
627 'G',
'l',
'o',
'b',
'a',
'l',0};
628 static const WCHAR classes_path_win32[] =
629 {
'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'W',
'i',
'n',
'3',
'2',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',
630 'G',
'l',
'o',
'b',
'a',
'l',0};
631 static const WCHAR classes_path_dotnet[] =
632 {
'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'r',
'\\',
'A',
's',
's',
'e',
'm',
'b',
'l',
'i',
'e',
's',
'\\',
'G',
'l',
'o',
'b',
'a',
'l',0};
639 if (win32)
path = classes_path_win32;
640 else path = classes_path_dotnet;
645 if (win32)
path = path_win32;
646 else path = path_dotnet;
689 WARN(
"failed to open local assembly key %d\n",
res);
697 WARN(
"failed to open global assembly key %d\n",
res);
704 WARN(
"failed to set assembly value %d\n",
res);
742 WARN(
"failed to delete local assembly key %d\n",
res);
748 WARN(
"failed to delete global assembly key %d\n",
res);
752 WARN(
"failed to delete global assembly value %d\n",
res);
static const WCHAR clr_version_v40[]
INTERNETFEATURELIST feature
UINT MSI_RecordSetStringW(MSIRECORD *, UINT, LPCWSTR) DECLSPEC_HIDDEN
IAssemblyCache * cache_net[CLR_VERSION_MAX]
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
MSIFEATURE * msi_get_loaded_feature(MSIPACKAGE *package, const WCHAR *Feature)
#define ASSEMBLYINFO_FLAG_INSTALLED
static const WCHAR * get_clr_version_str(enum clr_version version)
static HRESULT(WINAPI *pCreateAssemblyCacheNet10)(IAssemblyCache **
static WCHAR * get_assembly_display_name(MSIDATABASE *db, const WCHAR *comp, MSIASSEMBLY *assembly)
GLsizei const GLchar ** path
GLdouble GLdouble GLdouble r
#define HKEY_CURRENT_USER
struct file_info manifest
MSIASSEMBLY * msi_load_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
UINT MSI_ViewExecute(MSIQUERY *, MSIRECORD *) DECLSPEC_HIDDEN
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
WCHAR * msi_get_assembly_path(MSIPACKAGE *package, const WCHAR *displayname)
WINE_DEFAULT_DEBUG_CHANNEL(msi)
INSTALLSTATE msi_get_component_action(MSIPACKAGE *package, MSICOMPONENT *comp)
static const WCHAR clr_version_v10[]
static BOOL init_function_pointers(void)
static const WCHAR clr_version_v20[]
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
UINT MSI_OpenQuery(MSIDATABASE *, MSIQUERY **, LPCWSTR,...) DECLSPEC_HIDDEN
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
LONG WINAPI RegCloseKey(HKEY hKey)
#define ERROR_FUNCTION_FAILED
UINT MSI_ViewFetch(MSIQUERY *, MSIRECORD **) DECLSPEC_HIDDEN
static LONG open_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename, HKEY *hkey)
static MSIRECORD * get_assembly_record(MSIPACKAGE *package, const WCHAR *comp)
INT MSI_ProcessMessage(MSIPACKAGE *, INSTALLMESSAGE, MSIRECORD *) DECLSPEC_HIDDEN
void msi_destroy_assembly_caches(MSIPACKAGE *package)
IAssemblyEnum * msi_create_assembly_enum(MSIPACKAGE *package, const WCHAR *displayname)
static const WCHAR version[]
static BOOL is_assembly_installed(IAssemblyCache *cache, const WCHAR *display_name)
const WCHAR * MSI_RecordGetString(const MSIRECORD *, UINT) DECLSPEC_HIDDEN
static const WCHAR nameW[]
MSIFILE * msi_get_loaded_file(MSIPACKAGE *package, const WCHAR *key)
static enum clr_version get_clr_version(const WCHAR *filename)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
BOOL msi_init_assembly_caches(MSIPACKAGE *package)
IAssemblyCache * cache_sxs
static LONG open_assemblies_key(UINT context, BOOL win32, HKEY *hkey)
int msiobj_release(MSIOBJECTHDR *info)
static UINT get_assembly_name_attribute(MSIRECORD *rec, LPVOID param)
MSIRECORD * MSI_CreateRecord(UINT) DECLSPEC_HIDDEN
UINT msi_install_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
UINT msi_uninstall_assembly(MSIPACKAGE *package, MSICOMPONENT *comp)
#define E_NOT_SUFFICIENT_BUFFER
static LONG delete_local_assembly_key(UINT context, BOOL win32, const WCHAR *filename)
int MSI_RecordGetInteger(MSIRECORD *, UINT) DECLSPEC_HIDDEN
UINT ACTION_MsiPublishAssemblies(MSIPACKAGE *package)
static HMODULE *static LPWSTR
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
static const WCHAR clr_version_unknown[]
static LONG open_global_assembly_key(UINT context, BOOL win32, HKEY *hkey)
static BOOL msi_free(void *mem)
static const WCHAR clr_version_v11[]
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
static WCHAR * build_local_assembly_path(const WCHAR *filename)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
static IOleDocumentView * view
#define GetProcAddress(x, y)
static const CHAR manifest[]
#define HKEY_CLASSES_ROOT
GLboolean GLboolean GLboolean GLboolean a
UINT MSI_IterateRecords(MSIQUERY *, LPDWORD, record_func, LPVOID) DECLSPEC_HIDDEN
static LPWSTR strdupW(LPCWSTR src)
BOOL encode_base85_guid(GUID *, LPWSTR) DECLSPEC_HIDDEN
UINT ACTION_MsiUnpublishAssemblies(MSIPACKAGE *package)
GLuint const GLchar * name