2008-03-24 07:28:56 +01:00
|
|
|
/*
|
|
|
|
* IAssemblyName implementation
|
|
|
|
*
|
|
|
|
* Copyright 2008 James Hawkins
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
2010-10-04 21:14:23 +02:00
|
|
|
#include <assert.h>
|
2008-03-24 07:28:56 +01:00
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
#define INITGUID
|
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "ole2.h"
|
|
|
|
#include "guiddef.h"
|
|
|
|
#include "fusion.h"
|
2008-06-30 01:23:22 +02:00
|
|
|
#include "corerror.h"
|
2017-11-09 16:07:48 +01:00
|
|
|
#include "strsafe.h"
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2008-03-24 07:28:56 +01:00
|
|
|
#include "wine/debug.h"
|
2009-02-19 12:04:09 +01:00
|
|
|
#include "fusionpriv.h"
|
2008-03-24 07:28:56 +01:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(fusion);
|
|
|
|
|
|
|
|
typedef struct {
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyName IAssemblyName_iface;
|
2008-03-24 07:28:56 +01:00
|
|
|
|
2010-10-04 21:14:23 +02:00
|
|
|
LPWSTR path;
|
|
|
|
|
2008-06-30 01:23:22 +02:00
|
|
|
LPWSTR displayname;
|
|
|
|
LPWSTR name;
|
|
|
|
LPWSTR culture;
|
2010-07-20 19:02:36 +02:00
|
|
|
LPWSTR procarch;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2009-02-19 14:04:22 +01:00
|
|
|
WORD version[4];
|
2008-06-30 01:23:22 +02:00
|
|
|
DWORD versize;
|
|
|
|
|
|
|
|
BYTE pubkey[8];
|
|
|
|
BOOL haspubkey;
|
|
|
|
|
2017-11-09 16:07:53 +01:00
|
|
|
PEKIND pekind;
|
|
|
|
|
2008-03-24 07:28:56 +01:00
|
|
|
LONG ref;
|
|
|
|
} IAssemblyNameImpl;
|
|
|
|
|
2010-07-20 19:02:36 +02:00
|
|
|
static const WCHAR separator[] = {',',' ',0};
|
|
|
|
static const WCHAR version[] = {'V','e','r','s','i','o','n',0};
|
|
|
|
static const WCHAR culture[] = {'C','u','l','t','u','r','e',0};
|
|
|
|
static const WCHAR pubkey[] =
|
|
|
|
{'P','u','b','l','i','c','K','e','y','T','o','k','e','n',0};
|
|
|
|
static const WCHAR procarch[] = {'p','r','o','c','e','s','s','o','r',
|
|
|
|
'A','r','c','h','i','t','e','c','t','u','r','e',0};
|
|
|
|
|
|
|
|
#define CHARS_PER_PUBKEY 16
|
|
|
|
|
2011-06-01 00:30:06 +02:00
|
|
|
static inline IAssemblyNameImpl *impl_from_IAssemblyName(IAssemblyName *iface)
|
|
|
|
{
|
|
|
|
return CONTAINING_RECORD(iface, IAssemblyNameImpl, IAssemblyName_iface);
|
|
|
|
}
|
|
|
|
|
2008-03-24 07:28:56 +01:00
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface,
|
|
|
|
REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *This = impl_from_IAssemblyName(iface);
|
2008-03-24 07:28:56 +01:00
|
|
|
|
|
|
|
TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
|
|
|
|
|
|
|
|
*ppobj = NULL;
|
|
|
|
|
|
|
|
if (IsEqualIID(riid, &IID_IUnknown) ||
|
|
|
|
IsEqualIID(riid, &IID_IAssemblyName))
|
|
|
|
{
|
2012-07-31 12:25:21 +02:00
|
|
|
IAssemblyName_AddRef(iface);
|
2015-03-20 09:25:29 +01:00
|
|
|
*ppobj = &This->IAssemblyName_iface;
|
2008-03-24 07:28:56 +01:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
|
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *This = impl_from_IAssemblyName(iface);
|
2008-03-24 07:28:56 +01:00
|
|
|
ULONG refCount = InterlockedIncrement(&This->ref);
|
|
|
|
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p)->(ref before = %lu)\n", This, refCount - 1);
|
2008-03-24 07:28:56 +01:00
|
|
|
|
|
|
|
return refCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface)
|
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *This = impl_from_IAssemblyName(iface);
|
2008-03-24 07:28:56 +01:00
|
|
|
ULONG refCount = InterlockedDecrement(&This->ref);
|
|
|
|
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p)->(ref before = %lu)\n", This, refCount + 1);
|
2008-03-24 07:28:56 +01:00
|
|
|
|
|
|
|
if (!refCount)
|
2008-06-30 01:23:22 +02:00
|
|
|
{
|
2018-02-20 12:06:08 +01:00
|
|
|
heap_free(This->path);
|
|
|
|
heap_free(This->displayname);
|
|
|
|
heap_free(This->name);
|
|
|
|
heap_free(This->culture);
|
|
|
|
heap_free(This->procarch);
|
|
|
|
heap_free(This);
|
2008-06-30 01:23:22 +02:00
|
|
|
}
|
2008-03-24 07:28:56 +01:00
|
|
|
|
|
|
|
return refCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_SetProperty(IAssemblyName *iface,
|
|
|
|
DWORD PropertyId,
|
|
|
|
LPVOID pvProperty,
|
|
|
|
DWORD cbProperty)
|
|
|
|
{
|
2022-02-10 08:42:49 +01:00
|
|
|
FIXME("(%p, %ld, %p, %ld) stub!\n", iface, PropertyId, pvProperty, cbProperty);
|
2008-03-24 07:28:56 +01:00
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface,
|
|
|
|
DWORD PropertyId,
|
|
|
|
LPVOID pvProperty,
|
|
|
|
LPDWORD pcbProperty)
|
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *name = impl_from_IAssemblyName(iface);
|
2017-11-09 16:07:48 +01:00
|
|
|
DWORD size;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p, %ld, %p, %p)\n", iface, PropertyId, pvProperty, pcbProperty);
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2017-11-09 16:07:48 +01:00
|
|
|
size = *pcbProperty;
|
2008-06-30 01:23:22 +02:00
|
|
|
switch (PropertyId)
|
|
|
|
{
|
|
|
|
case ASM_NAME_NULL_PUBLIC_KEY:
|
|
|
|
case ASM_NAME_NULL_PUBLIC_KEY_TOKEN:
|
|
|
|
if (name->haspubkey)
|
|
|
|
return S_OK;
|
|
|
|
return S_FALSE;
|
|
|
|
|
|
|
|
case ASM_NAME_NULL_CUSTOM:
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
case ASM_NAME_NAME:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->name)
|
|
|
|
{
|
|
|
|
*pcbProperty = (lstrlenW(name->name) + 1) * 2;
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
lstrcpyW(pvProperty, name->name);
|
2008-06-30 01:23:22 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ASM_NAME_MAJOR_VERSION:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->versize >= 1)
|
2017-11-09 16:07:48 +01:00
|
|
|
{
|
2008-06-30 01:23:22 +02:00
|
|
|
*pcbProperty = sizeof(WORD);
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
*((WORD *)pvProperty) = name->version[0];
|
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ASM_NAME_MINOR_VERSION:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->versize >= 2)
|
2017-11-09 16:07:48 +01:00
|
|
|
{
|
2008-06-30 01:23:22 +02:00
|
|
|
*pcbProperty = sizeof(WORD);
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
*((WORD *)pvProperty) = name->version[1];
|
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ASM_NAME_BUILD_NUMBER:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->versize >= 3)
|
2017-11-09 16:07:48 +01:00
|
|
|
{
|
2008-06-30 01:23:22 +02:00
|
|
|
*pcbProperty = sizeof(WORD);
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
*((WORD *)pvProperty) = name->version[2];
|
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ASM_NAME_REVISION_NUMBER:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->versize >= 4)
|
2017-11-09 16:07:48 +01:00
|
|
|
{
|
2008-06-30 01:23:22 +02:00
|
|
|
*pcbProperty = sizeof(WORD);
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
*((WORD *)pvProperty) = name->version[3];
|
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ASM_NAME_CULTURE:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->culture)
|
|
|
|
{
|
|
|
|
*pcbProperty = (lstrlenW(name->culture) + 1) * 2;
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
lstrcpyW(pvProperty, name->culture);
|
2008-06-30 01:23:22 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ASM_NAME_PUBLIC_KEY_TOKEN:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->haspubkey)
|
|
|
|
{
|
|
|
|
*pcbProperty = sizeof(DWORD) * 2;
|
2017-11-09 16:07:48 +01:00
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
memcpy(pvProperty, name->pubkey, sizeof(DWORD) * 2);
|
2008-06-30 01:23:22 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2017-11-09 16:07:53 +01:00
|
|
|
case ASM_NAME_ARCHITECTURE:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
if (name->pekind != peNone)
|
|
|
|
{
|
|
|
|
*pcbProperty = sizeof(PEKIND);
|
|
|
|
if (size < *pcbProperty)
|
|
|
|
return STRSAFE_E_INSUFFICIENT_BUFFER;
|
|
|
|
*((PEKIND *)pvProperty) = name->pekind;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2008-06-30 01:23:22 +02:00
|
|
|
default:
|
|
|
|
*pcbProperty = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
2008-03-24 07:28:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_Finalize(IAssemblyName *iface)
|
|
|
|
{
|
|
|
|
FIXME("(%p) stub!\n", iface);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
|
|
|
|
LPOLESTR szDisplayName,
|
|
|
|
LPDWORD pccDisplayName,
|
|
|
|
DWORD dwDisplayFlags)
|
|
|
|
{
|
2015-04-10 12:57:15 +02:00
|
|
|
static const WCHAR equals[] = {'=',0};
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *name = impl_from_IAssemblyName(iface);
|
2015-04-10 12:57:15 +02:00
|
|
|
WCHAR verstr[30], *cultureval = NULL;
|
2010-07-20 19:02:36 +02:00
|
|
|
DWORD size;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p, %p, %p, %ld)\n", iface, szDisplayName,
|
2008-03-24 07:28:56 +01:00
|
|
|
pccDisplayName, dwDisplayFlags);
|
|
|
|
|
2010-07-20 19:02:36 +02:00
|
|
|
if (dwDisplayFlags == 0)
|
|
|
|
{
|
|
|
|
if (!name->displayname || !*name->displayname)
|
|
|
|
return FUSION_E_INVALID_NAME;
|
|
|
|
|
2019-06-04 09:14:04 +02:00
|
|
|
size = lstrlenW(name->displayname) + 1;
|
2015-04-10 12:57:15 +02:00
|
|
|
|
|
|
|
if (*pccDisplayName < size)
|
|
|
|
{
|
|
|
|
*pccDisplayName = size;
|
|
|
|
return E_NOT_SUFFICIENT_BUFFER;
|
|
|
|
}
|
2010-07-20 19:02:36 +02:00
|
|
|
|
2019-06-04 09:14:04 +02:00
|
|
|
if (szDisplayName) lstrcpyW(szDisplayName, name->displayname);
|
2010-07-20 19:02:36 +02:00
|
|
|
*pccDisplayName = size;
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!name->name || !*name->name)
|
2008-06-30 01:23:22 +02:00
|
|
|
return FUSION_E_INVALID_NAME;
|
|
|
|
|
2010-07-20 19:02:36 +02:00
|
|
|
/* Verify buffer size is sufficient */
|
|
|
|
size = lstrlenW(name->name) + 1;
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_VERSION) && (name->versize > 0))
|
|
|
|
{
|
|
|
|
static const WCHAR spec[] = {'%','d',0};
|
|
|
|
static const WCHAR period[] = {'.',0};
|
2013-01-16 21:42:26 +01:00
|
|
|
DWORD i;
|
2010-07-20 19:02:36 +02:00
|
|
|
|
|
|
|
wsprintfW(verstr, spec, name->version[0]);
|
|
|
|
|
|
|
|
for (i = 1; i < name->versize; i++)
|
|
|
|
{
|
|
|
|
WCHAR value[6];
|
|
|
|
wsprintfW(value, spec, name->version[i]);
|
|
|
|
|
|
|
|
lstrcatW(verstr, period);
|
|
|
|
lstrcatW(verstr, value);
|
|
|
|
}
|
|
|
|
|
|
|
|
size += lstrlenW(separator) + lstrlenW(version) + lstrlenW(equals) + lstrlenW(verstr);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_CULTURE) && (name->culture))
|
|
|
|
{
|
|
|
|
static const WCHAR neutral[] = {'n','e','u','t','r','a','l', 0};
|
|
|
|
|
|
|
|
cultureval = (lstrlenW(name->culture) == 2) ? name->culture : (LPWSTR) neutral;
|
|
|
|
size += lstrlenW(separator) + lstrlenW(culture) + lstrlenW(equals) + lstrlenW(cultureval);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
|
|
|
|
size += lstrlenW(separator) + lstrlenW(pubkey) + lstrlenW(equals) + CHARS_PER_PUBKEY;
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_PROCESSORARCHITECTURE) && (name->procarch))
|
|
|
|
size += lstrlenW(separator) + lstrlenW(procarch) + lstrlenW(equals) + lstrlenW(name->procarch);
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2010-07-20 19:02:36 +02:00
|
|
|
if (size > *pccDisplayName)
|
2017-11-10 12:25:10 +01:00
|
|
|
{
|
|
|
|
*pccDisplayName = size;
|
|
|
|
return E_NOT_SUFFICIENT_BUFFER;
|
|
|
|
}
|
2010-07-20 19:02:36 +02:00
|
|
|
|
|
|
|
/* Construct the string */
|
|
|
|
lstrcpyW(szDisplayName, name->name);
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_VERSION) && (name->versize > 0))
|
|
|
|
{
|
|
|
|
lstrcatW(szDisplayName, separator);
|
|
|
|
|
|
|
|
lstrcatW(szDisplayName, version);
|
|
|
|
lstrcatW(szDisplayName, equals);
|
|
|
|
lstrcatW(szDisplayName, verstr);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_CULTURE) && (name->culture))
|
|
|
|
{
|
|
|
|
lstrcatW(szDisplayName, separator);
|
|
|
|
|
|
|
|
lstrcatW(szDisplayName, culture);
|
|
|
|
lstrcatW(szDisplayName, equals);
|
|
|
|
lstrcatW(szDisplayName, cultureval);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
|
|
|
|
{
|
|
|
|
WCHAR pkt[CHARS_PER_PUBKEY + 1];
|
2017-11-10 12:25:17 +01:00
|
|
|
static const WCHAR spec[] = {'%','0','2','x','%','0','2','x','%','0','2','x',
|
|
|
|
'%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',0};
|
2010-07-20 19:02:36 +02:00
|
|
|
|
|
|
|
lstrcatW(szDisplayName, separator);
|
|
|
|
|
|
|
|
lstrcatW(szDisplayName, pubkey);
|
|
|
|
lstrcatW(szDisplayName, equals);
|
|
|
|
|
|
|
|
wsprintfW(pkt, spec, name->pubkey[0], name->pubkey[1], name->pubkey[2],
|
|
|
|
name->pubkey[3], name->pubkey[4], name->pubkey[5], name->pubkey[6],
|
|
|
|
name->pubkey[7]);
|
|
|
|
|
|
|
|
lstrcatW(szDisplayName, pkt);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ((dwDisplayFlags & ASM_DISPLAYF_PROCESSORARCHITECTURE) && (name->procarch))
|
|
|
|
{
|
|
|
|
lstrcatW(szDisplayName, separator);
|
|
|
|
|
|
|
|
lstrcatW(szDisplayName, procarch);
|
|
|
|
lstrcatW(szDisplayName, equals);
|
|
|
|
lstrcatW(szDisplayName, name->procarch);
|
|
|
|
}
|
|
|
|
|
|
|
|
*pccDisplayName = size;
|
2008-06-30 01:23:22 +02:00
|
|
|
return S_OK;
|
2008-03-24 07:28:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_Reserved(IAssemblyName *iface,
|
|
|
|
REFIID refIID,
|
|
|
|
IUnknown *pUnkReserved1,
|
|
|
|
IUnknown *pUnkReserved2,
|
|
|
|
LPCOLESTR szReserved,
|
|
|
|
LONGLONG llReserved,
|
|
|
|
LPVOID pvReserved,
|
|
|
|
DWORD cbReserved,
|
|
|
|
LPVOID *ppReserved)
|
|
|
|
{
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p, %s, %p, %p, %s, %s, %p, %ld, %p)\n", iface,
|
2008-03-24 07:28:56 +01:00
|
|
|
debugstr_guid(refIID), pUnkReserved1, pUnkReserved2,
|
2017-08-22 23:49:55 +02:00
|
|
|
debugstr_w(szReserved), wine_dbgstr_longlong(llReserved),
|
2008-03-24 07:28:56 +01:00
|
|
|
pvReserved, cbReserved, ppReserved);
|
|
|
|
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
|
|
|
|
LPDWORD lpcwBuffer,
|
|
|
|
WCHAR *pwzName)
|
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *name = impl_from_IAssemblyName(iface);
|
2015-04-10 12:56:48 +02:00
|
|
|
DWORD len;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
TRACE("(%p, %p, %p)\n", iface, lpcwBuffer, pwzName);
|
|
|
|
|
2015-04-10 12:56:48 +02:00
|
|
|
if (name->name)
|
2019-06-04 09:14:04 +02:00
|
|
|
len = lstrlenW(name->name) + 1;
|
2015-04-10 12:56:48 +02:00
|
|
|
else
|
|
|
|
len = 0;
|
|
|
|
|
|
|
|
if (*lpcwBuffer < len)
|
2008-06-30 01:23:22 +02:00
|
|
|
{
|
2015-04-10 12:56:48 +02:00
|
|
|
*lpcwBuffer = len;
|
|
|
|
return E_NOT_SUFFICIENT_BUFFER;
|
2008-06-30 01:23:22 +02:00
|
|
|
}
|
2015-04-10 12:56:48 +02:00
|
|
|
if (!name->name) lpcwBuffer[0] = 0;
|
2019-06-04 09:14:04 +02:00
|
|
|
else lstrcpyW(pwzName, name->name);
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2015-04-10 12:56:48 +02:00
|
|
|
*lpcwBuffer = len;
|
2008-06-30 01:23:22 +02:00
|
|
|
return S_OK;
|
2008-03-24 07:28:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface,
|
|
|
|
LPDWORD pdwVersionHi,
|
|
|
|
LPDWORD pdwVersionLow)
|
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *name = impl_from_IAssemblyName(iface);
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
TRACE("(%p, %p, %p)\n", iface, pdwVersionHi, pdwVersionLow);
|
|
|
|
|
|
|
|
*pdwVersionHi = 0;
|
|
|
|
*pdwVersionLow = 0;
|
|
|
|
|
|
|
|
if (name->versize != 4)
|
|
|
|
return FUSION_E_INVALID_NAME;
|
|
|
|
|
|
|
|
*pdwVersionHi = (name->version[0] << 16) + name->version[1];
|
|
|
|
*pdwVersionLow = (name->version[2] << 16) + name->version[3];
|
|
|
|
|
|
|
|
return S_OK;
|
2008-03-24 07:28:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface,
|
|
|
|
IAssemblyName *pName,
|
2012-05-16 10:06:54 +02:00
|
|
|
DWORD flags)
|
2008-03-24 07:28:56 +01:00
|
|
|
{
|
2012-05-16 10:06:54 +02:00
|
|
|
IAssemblyNameImpl *name1 = impl_from_IAssemblyName(iface);
|
|
|
|
IAssemblyNameImpl *name2 = impl_from_IAssemblyName(pName);
|
|
|
|
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p, %p, 0x%08lx)\n", iface, pName, flags);
|
2012-05-16 10:06:54 +02:00
|
|
|
|
|
|
|
if (!pName) return S_FALSE;
|
|
|
|
if (flags & ~ASM_CMPF_IL_ALL) FIXME("unsupported flags\n");
|
|
|
|
|
2019-06-04 09:14:04 +02:00
|
|
|
if ((flags & ASM_CMPF_NAME) && lstrcmpW(name1->name, name2->name)) return S_FALSE;
|
2012-05-16 10:06:54 +02:00
|
|
|
if (name1->versize && name2->versize)
|
|
|
|
{
|
|
|
|
if ((flags & ASM_CMPF_MAJOR_VERSION) &&
|
|
|
|
name1->version[0] != name2->version[0]) return S_FALSE;
|
|
|
|
if ((flags & ASM_CMPF_MINOR_VERSION) &&
|
|
|
|
name1->version[1] != name2->version[1]) return S_FALSE;
|
|
|
|
if ((flags & ASM_CMPF_BUILD_NUMBER) &&
|
|
|
|
name1->version[2] != name2->version[2]) return S_FALSE;
|
|
|
|
if ((flags & ASM_CMPF_REVISION_NUMBER) &&
|
|
|
|
name1->version[3] != name2->version[3]) return S_FALSE;
|
|
|
|
}
|
|
|
|
if ((flags & ASM_CMPF_PUBLIC_KEY_TOKEN) &&
|
|
|
|
name1->haspubkey && name2->haspubkey &&
|
|
|
|
memcmp(name1->pubkey, name2->pubkey, sizeof(name1->pubkey))) return S_FALSE;
|
|
|
|
|
|
|
|
if ((flags & ASM_CMPF_CULTURE) &&
|
|
|
|
name1->culture && name2->culture &&
|
2019-06-04 09:14:04 +02:00
|
|
|
lstrcmpW(name1->culture, name2->culture)) return S_FALSE;
|
2012-05-16 10:06:54 +02:00
|
|
|
|
|
|
|
return S_OK;
|
2008-03-24 07:28:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI IAssemblyNameImpl_Clone(IAssemblyName *iface,
|
|
|
|
IAssemblyName **pName)
|
|
|
|
{
|
|
|
|
FIXME("(%p, %p) stub!\n", iface, pName);
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const IAssemblyNameVtbl AssemblyNameVtbl = {
|
|
|
|
IAssemblyNameImpl_QueryInterface,
|
|
|
|
IAssemblyNameImpl_AddRef,
|
|
|
|
IAssemblyNameImpl_Release,
|
|
|
|
IAssemblyNameImpl_SetProperty,
|
|
|
|
IAssemblyNameImpl_GetProperty,
|
|
|
|
IAssemblyNameImpl_Finalize,
|
|
|
|
IAssemblyNameImpl_GetDisplayName,
|
|
|
|
IAssemblyNameImpl_Reserved,
|
|
|
|
IAssemblyNameImpl_GetName,
|
|
|
|
IAssemblyNameImpl_GetVersion,
|
|
|
|
IAssemblyNameImpl_IsEqual,
|
|
|
|
IAssemblyNameImpl_Clone
|
|
|
|
};
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2010-10-04 21:14:23 +02:00
|
|
|
/* Internal methods */
|
2011-06-01 00:30:06 +02:00
|
|
|
static inline IAssemblyNameImpl *unsafe_impl_from_IAssemblyName(IAssemblyName *iface)
|
2010-10-04 21:14:23 +02:00
|
|
|
{
|
2011-06-01 00:30:06 +02:00
|
|
|
assert(iface->lpVtbl == &AssemblyNameVtbl);
|
2010-10-04 21:14:23 +02:00
|
|
|
|
2011-06-01 00:30:06 +02:00
|
|
|
return impl_from_IAssemblyName(iface);
|
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path)
|
|
|
|
{
|
|
|
|
IAssemblyNameImpl *name = unsafe_impl_from_IAssemblyName(iface);
|
2010-10-04 21:14:23 +02:00
|
|
|
|
|
|
|
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;
|
2011-06-01 00:30:06 +02:00
|
|
|
IAssemblyNameImpl *name = unsafe_impl_from_IAssemblyName(iface);
|
2010-10-04 21:14:23 +02:00
|
|
|
|
|
|
|
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
|
2014-10-07 07:44:30 +02:00
|
|
|
return E_NOT_SUFFICIENT_BUFFER;
|
2010-10-04 21:14:23 +02:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2008-06-30 01:23:22 +02:00
|
|
|
static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
|
|
|
|
{
|
|
|
|
LPWSTR beg, end;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0, beg = version; i < 4; i++)
|
|
|
|
{
|
|
|
|
if (!*beg)
|
|
|
|
return S_OK;
|
|
|
|
|
2019-06-04 09:14:04 +02:00
|
|
|
end = wcschr(beg, '.');
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
if (end) *end = '\0';
|
2019-06-04 09:14:04 +02:00
|
|
|
name->version[i] = wcstol(beg, NULL, 10);
|
2008-06-30 01:23:22 +02:00
|
|
|
name->versize++;
|
|
|
|
|
|
|
|
if (!end && i < 3)
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
beg = end + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2010-10-03 00:25:52 +02:00
|
|
|
static HRESULT parse_culture(IAssemblyNameImpl *name, LPCWSTR culture)
|
2008-06-30 01:23:22 +02:00
|
|
|
{
|
|
|
|
static const WCHAR empty[] = {0};
|
|
|
|
|
|
|
|
if (lstrlenW(culture) == 2)
|
|
|
|
name->culture = strdupW(culture);
|
|
|
|
else
|
|
|
|
name->culture = strdupW(empty);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static BOOL is_hex(WCHAR c)
|
|
|
|
{
|
|
|
|
return ((c >= 'a' && c <= 'f') ||
|
|
|
|
(c >= 'A' && c <= 'F') ||
|
|
|
|
(c >= '0' && c <= '9'));
|
|
|
|
}
|
|
|
|
|
|
|
|
static BYTE hextobyte(WCHAR c)
|
|
|
|
{
|
|
|
|
if(c >= '0' && c <= '9')
|
|
|
|
return c - '0';
|
|
|
|
if(c >= 'A' && c <= 'F')
|
|
|
|
return c - 'A' + 10;
|
|
|
|
if(c >= 'a' && c <= 'f')
|
|
|
|
return c - 'a' + 10;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-10-03 00:25:52 +02:00
|
|
|
static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey)
|
2008-06-30 01:23:22 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
BYTE val;
|
2013-01-31 06:08:38 +01:00
|
|
|
static const WCHAR nullstr[] = {'n','u','l','l',0};
|
|
|
|
|
|
|
|
if(lstrcmpiW(pubkey, nullstr) == 0)
|
|
|
|
return FUSION_E_PRIVATE_ASM_DISALLOWED;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
if (lstrlenW(pubkey) < CHARS_PER_PUBKEY)
|
|
|
|
return FUSION_E_INVALID_NAME;
|
|
|
|
|
|
|
|
for (i = 0; i < CHARS_PER_PUBKEY; i++)
|
|
|
|
if (!is_hex(pubkey[i]))
|
|
|
|
return FUSION_E_INVALID_NAME;
|
|
|
|
|
|
|
|
name->haspubkey = TRUE;
|
|
|
|
|
|
|
|
for (i = 0; i < CHARS_PER_PUBKEY; i += 2)
|
|
|
|
{
|
|
|
|
val = (hextobyte(pubkey[i]) << 4) + hextobyte(pubkey[i + 1]);
|
|
|
|
name->pubkey[i / 2] = val;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2017-11-09 16:07:53 +01:00
|
|
|
static HRESULT parse_procarch(IAssemblyNameImpl *name, LPCWSTR procarch)
|
|
|
|
{
|
|
|
|
static const WCHAR msilW[] = {'m','s','i','l',0};
|
|
|
|
static const WCHAR x86W[] = {'x','8','6',0};
|
|
|
|
static const WCHAR ia64W[] = {'i','a','6','4',0};
|
|
|
|
static const WCHAR amd64W[] = {'a','m','d','6','4',0};
|
|
|
|
|
|
|
|
if (!lstrcmpiW(procarch, msilW))
|
|
|
|
name->pekind = peMSIL;
|
|
|
|
else if (!lstrcmpiW(procarch, x86W))
|
|
|
|
name->pekind = peI386;
|
|
|
|
else if (!lstrcmpiW(procarch, ia64W))
|
|
|
|
name->pekind = peIA64;
|
|
|
|
else if (!lstrcmpiW(procarch, amd64W))
|
|
|
|
name->pekind = peAMD64;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("unrecognized architecture: %s\n", wine_dbgstr_w(procarch));
|
|
|
|
return FUSION_E_INVALID_NAME;
|
|
|
|
}
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2012-05-16 10:07:35 +02:00
|
|
|
static WCHAR *parse_value( const WCHAR *str, unsigned int len )
|
|
|
|
{
|
|
|
|
WCHAR *ret;
|
|
|
|
const WCHAR *p = str;
|
|
|
|
BOOL quoted = FALSE;
|
|
|
|
unsigned int i = 0;
|
|
|
|
|
2018-02-20 12:06:08 +01:00
|
|
|
if (!(ret = heap_alloc( (len + 1) * sizeof(WCHAR) ))) return NULL;
|
2012-05-16 10:07:35 +02:00
|
|
|
if (*p == '\"')
|
|
|
|
{
|
|
|
|
quoted = TRUE;
|
|
|
|
p++;
|
|
|
|
}
|
|
|
|
while (*p && *p != '\"') ret[i++] = *p++;
|
|
|
|
if ((quoted && *p != '\"') || (!quoted && *p == '\"'))
|
|
|
|
{
|
2018-02-20 12:06:08 +01:00
|
|
|
heap_free( ret );
|
2012-05-16 10:07:35 +02:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
ret[i] = 0;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-06-30 01:23:22 +02:00
|
|
|
static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyName)
|
|
|
|
{
|
2012-05-16 10:07:35 +02:00
|
|
|
LPWSTR str, save, ptr, ptr2, value;
|
2008-06-30 01:23:22 +02:00
|
|
|
HRESULT hr = S_OK;
|
|
|
|
BOOL done = FALSE;
|
|
|
|
|
|
|
|
if (!szAssemblyName)
|
|
|
|
return S_OK;
|
|
|
|
|
|
|
|
name->displayname = strdupW(szAssemblyName);
|
|
|
|
if (!name->displayname)
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
|
|
|
|
str = strdupW(szAssemblyName);
|
|
|
|
save = str;
|
|
|
|
if (!str)
|
2011-01-16 10:41:27 +01:00
|
|
|
{
|
|
|
|
hr = E_OUTOFMEMORY;
|
|
|
|
goto done;
|
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2019-06-04 09:14:04 +02:00
|
|
|
ptr = wcschr(str, ',');
|
2008-06-30 01:23:22 +02:00
|
|
|
if (ptr) *ptr = '\0';
|
2010-09-10 09:59:53 +02:00
|
|
|
|
|
|
|
/* no ',' but ' ' only */
|
2019-06-04 09:14:04 +02:00
|
|
|
if( !ptr && wcschr(str, ' ') )
|
2010-09-10 09:59:53 +02:00
|
|
|
{
|
|
|
|
hr = FUSION_E_INVALID_NAME;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
2008-06-30 01:23:22 +02:00
|
|
|
name->name = strdupW(str);
|
|
|
|
if (!name->name)
|
2011-01-16 10:41:27 +01:00
|
|
|
{
|
|
|
|
hr = E_OUTOFMEMORY;
|
|
|
|
goto done;
|
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
if (!ptr)
|
|
|
|
goto done;
|
|
|
|
|
2012-05-16 10:07:12 +02:00
|
|
|
str = ptr + 1;
|
2008-06-30 01:23:22 +02:00
|
|
|
while (!done)
|
|
|
|
{
|
2019-06-04 09:14:04 +02:00
|
|
|
ptr = wcschr(str, '=');
|
2008-06-30 01:23:22 +02:00
|
|
|
if (!ptr)
|
|
|
|
{
|
|
|
|
hr = FUSION_E_INVALID_NAME;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
*(ptr++) = '\0';
|
|
|
|
if (!*ptr)
|
|
|
|
{
|
|
|
|
hr = FUSION_E_INVALID_NAME;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
2019-06-04 09:14:04 +02:00
|
|
|
if (!(ptr2 = wcschr(ptr, ',')))
|
2008-06-30 01:23:22 +02:00
|
|
|
{
|
2019-06-04 09:14:04 +02:00
|
|
|
if (!(ptr2 = wcschr(ptr, '\0')))
|
2008-06-30 01:23:22 +02:00
|
|
|
{
|
|
|
|
hr = FUSION_E_INVALID_NAME;
|
|
|
|
goto done;
|
|
|
|
}
|
|
|
|
|
|
|
|
done = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
*ptr2 = '\0';
|
2012-05-16 10:07:35 +02:00
|
|
|
if (!(value = parse_value( ptr, ptr2 - ptr )))
|
|
|
|
{
|
|
|
|
hr = FUSION_E_INVALID_NAME;
|
|
|
|
goto done;
|
|
|
|
}
|
2009-02-19 14:04:41 +01:00
|
|
|
while (*str == ' ') str++;
|
|
|
|
|
2012-05-16 10:07:35 +02:00
|
|
|
if (!lstrcmpiW(str, version))
|
|
|
|
hr = parse_version( name, value );
|
|
|
|
else if (!lstrcmpiW(str, culture))
|
|
|
|
hr = parse_culture( name, value );
|
|
|
|
else if (!lstrcmpiW(str, pubkey))
|
|
|
|
hr = parse_pubkey( name, value );
|
|
|
|
else if (!lstrcmpiW(str, procarch))
|
2010-07-20 19:02:36 +02:00
|
|
|
{
|
2012-05-16 10:07:35 +02:00
|
|
|
name->procarch = value;
|
|
|
|
value = NULL;
|
2017-11-09 16:07:53 +01:00
|
|
|
|
|
|
|
hr = parse_procarch( name, name->procarch );
|
2010-07-20 19:02:36 +02:00
|
|
|
}
|
2018-02-20 12:06:08 +01:00
|
|
|
heap_free( value );
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
if (FAILED(hr))
|
|
|
|
goto done;
|
|
|
|
|
|
|
|
str = ptr2 + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
done:
|
2018-02-20 12:06:08 +01:00
|
|
|
heap_free(save);
|
2009-12-07 09:54:38 +01:00
|
|
|
if (FAILED(hr))
|
|
|
|
{
|
2018-02-20 12:06:08 +01:00
|
|
|
heap_free(name->displayname);
|
|
|
|
heap_free(name->name);
|
|
|
|
heap_free(name->culture);
|
|
|
|
heap_free(name->procarch);
|
2009-12-07 09:54:38 +01:00
|
|
|
}
|
2008-06-30 01:23:22 +02:00
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* CreateAssemblyNameObject (FUSION.@)
|
|
|
|
*/
|
2016-08-11 10:53:25 +02:00
|
|
|
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj,
|
2008-06-30 01:23:22 +02:00
|
|
|
LPCWSTR szAssemblyName, DWORD dwFlags,
|
|
|
|
LPVOID pvReserved)
|
|
|
|
{
|
|
|
|
IAssemblyNameImpl *name;
|
|
|
|
HRESULT hr;
|
|
|
|
|
2022-02-10 08:42:49 +01:00
|
|
|
TRACE("(%p, %s, %08lx, %p)\n", ppAssemblyNameObj,
|
2008-06-30 01:23:22 +02:00
|
|
|
debugstr_w(szAssemblyName), dwFlags, pvReserved);
|
|
|
|
|
|
|
|
if (!ppAssemblyNameObj)
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
if ((dwFlags & CANOF_PARSE_DISPLAY_NAME) &&
|
|
|
|
(!szAssemblyName || !*szAssemblyName))
|
|
|
|
return E_INVALIDARG;
|
|
|
|
|
2018-02-20 12:06:08 +01:00
|
|
|
if (!(name = heap_alloc_zero(sizeof(*name)))) return E_OUTOFMEMORY;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
2011-06-01 00:30:06 +02:00
|
|
|
name->IAssemblyName_iface.lpVtbl = &AssemblyNameVtbl;
|
2008-06-30 01:23:22 +02:00
|
|
|
name->ref = 1;
|
|
|
|
|
|
|
|
hr = parse_display_name(name, szAssemblyName);
|
|
|
|
if (FAILED(hr))
|
|
|
|
{
|
2018-02-20 12:06:08 +01:00
|
|
|
heap_free(name);
|
2008-06-30 01:23:22 +02:00
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2011-06-01 00:30:06 +02:00
|
|
|
*ppAssemblyNameObj = &name->IAssemblyName_iface;
|
2008-06-30 01:23:22 +02:00
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|