ReactOS  0.4.14-dev-55-g2da92ac
asmname.c File Reference
#include <stdarg.h>
#include <assert.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "guiddef.h"
#include "fusion.h"
#include "corerror.h"
#include "strsafe.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "fusionpriv.h"
Include dependency graph for asmname.c:

Go to the source code of this file.

Classes

struct  IAssemblyNameImpl
 

Macros

#define COBJMACROS
 
#define INITGUID
 
#define CHARS_PER_PUBKEY   16
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (fusion)
 
static IAssemblyNameImplimpl_from_IAssemblyName (IAssemblyName *iface)
 
static HRESULT WINAPI IAssemblyNameImpl_QueryInterface (IAssemblyName *iface, REFIID riid, LPVOID *ppobj)
 
static ULONG WINAPI IAssemblyNameImpl_AddRef (IAssemblyName *iface)
 
static ULONG WINAPI IAssemblyNameImpl_Release (IAssemblyName *iface)
 
static HRESULT WINAPI IAssemblyNameImpl_SetProperty (IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, DWORD cbProperty)
 
static HRESULT WINAPI IAssemblyNameImpl_GetProperty (IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, LPDWORD pcbProperty)
 
static HRESULT WINAPI IAssemblyNameImpl_Finalize (IAssemblyName *iface)
 
static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName (IAssemblyName *iface, LPOLESTR szDisplayName, LPDWORD pccDisplayName, DWORD dwDisplayFlags)
 
static HRESULT WINAPI IAssemblyNameImpl_Reserved (IAssemblyName *iface, REFIID refIID, IUnknown *pUnkReserved1, IUnknown *pUnkReserved2, LPCOLESTR szReserved, LONGLONG llReserved, LPVOID pvReserved, DWORD cbReserved, LPVOID *ppReserved)
 
static HRESULT WINAPI IAssemblyNameImpl_GetName (IAssemblyName *iface, LPDWORD lpcwBuffer, WCHAR *pwzName)
 
static HRESULT WINAPI IAssemblyNameImpl_GetVersion (IAssemblyName *iface, LPDWORD pdwVersionHi, LPDWORD pdwVersionLow)
 
static HRESULT WINAPI IAssemblyNameImpl_IsEqual (IAssemblyName *iface, IAssemblyName *pName, DWORD flags)
 
static HRESULT WINAPI IAssemblyNameImpl_Clone (IAssemblyName *iface, IAssemblyName **pName)
 
static IAssemblyNameImplunsafe_impl_from_IAssemblyName (IAssemblyName *iface)
 
HRESULT IAssemblyName_SetPath (IAssemblyName *iface, LPCWSTR path)
 
HRESULT IAssemblyName_GetPath (IAssemblyName *iface, LPWSTR buf, ULONG *len)
 
static HRESULT parse_version (IAssemblyNameImpl *name, LPWSTR version)
 
static HRESULT parse_culture (IAssemblyNameImpl *name, LPCWSTR culture)
 
static BOOL is_hex (WCHAR c)
 
static BYTE hextobyte (WCHAR c)
 
static HRESULT parse_pubkey (IAssemblyNameImpl *name, LPCWSTR pubkey)
 
static HRESULT parse_procarch (IAssemblyNameImpl *name, LPCWSTR procarch)
 
static WCHARparse_value (const WCHAR *str, unsigned int len)
 
static HRESULT parse_display_name (IAssemblyNameImpl *name, LPCWSTR szAssemblyName)
 
HRESULT WINAPI CreateAssemblyNameObject (IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
 

Variables

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 []
 
static const WCHAR procarch []
 
static const IAssemblyNameVtbl AssemblyNameVtbl
 

Macro Definition Documentation

◆ CHARS_PER_PUBKEY

#define CHARS_PER_PUBKEY   16

Definition at line 71 of file asmname.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file asmname.c.

◆ INITGUID

#define INITGUID

Definition at line 25 of file asmname.c.

Function Documentation

◆ CreateAssemblyNameObject()

HRESULT WINAPI CreateAssemblyNameObject ( IAssemblyName **  ppAssemblyNameObj,
LPCWSTR  szAssemblyName,
DWORD  dwFlags,
LPVOID  pvReserved 
)

Definition at line 795 of file asmname.c.

798 {
800  HRESULT hr;
801 
802  TRACE("(%p, %s, %08x, %p)\n", ppAssemblyNameObj,
804 
805  if (!ppAssemblyNameObj)
806  return E_INVALIDARG;
807 
810  return E_INVALIDARG;
811 
812  if (!(name = heap_alloc_zero(sizeof(*name)))) return E_OUTOFMEMORY;
813 
815  name->ref = 1;
816 
818  if (FAILED(hr))
819  {
820  heap_free(name);
821  return hr;
822  }
823 
824  *ppAssemblyNameObj = &name->IAssemblyName_iface;
825 
826  return S_OK;
827 }
HRESULT hr
Definition: shlfolder.c:183
static LPCWSTR szAssemblyName
Definition: asmname.c:40
IAssemblyName IAssemblyName_iface
Definition: name.c:38
static LPCWSTR DWORD LPVOID pvReserved
Definition: asmname.c:40
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
#define E_INVALIDARG
Definition: ddrawi.h:101
static const IAssemblyNameVtbl AssemblyNameVtbl
Definition: asmname.c:498
static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyName)
Definition: asmname.c:682
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by cache_QueryAssemblyInfo(), cache_UninstallAssembly(), enum_gac_assemblies(), IAssemblyCacheImpl_QueryAssemblyInfo(), and IAssemblyCacheImpl_UninstallAssembly().

◆ hextobyte()

static BYTE hextobyte ( WCHAR  c)
static

Definition at line 597 of file asmname.c.

598 {
599  if(c >= '0' && c <= '9')
600  return c - '0';
601  if(c >= 'A' && c <= 'F')
602  return c - 'A' + 10;
603  if(c >= 'a' && c <= 'f')
604  return c - 'a' + 10;
605  return 0;
606 }
const GLubyte * c
Definition: glext.h:8905

Referenced by parse_pubkey().

◆ IAssemblyName_GetPath()

HRESULT IAssemblyName_GetPath ( IAssemblyName iface,
LPWSTR  buf,
ULONG len 
)

Definition at line 532 of file asmname.c.

533 {
534  ULONG buffer_size = *len;
536 
537  if (!name->path)
538  return S_OK;
539 
540  if (!buf)
541  buffer_size = 0;
542 
543  *len = lstrlenW(name->path) + 1;
544 
545  if (*len <= buffer_size)
546  lstrcpyW(buf, name->path);
547  else
549 
550  return S_OK;
551 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define lstrlenW
Definition: compat.h:407
static IAssemblyNameImpl * unsafe_impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:514
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:927
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define S_OK
Definition: intsafe.h:59
#define lstrcpyW
Definition: compat.h:406
Definition: name.c:36
unsigned int ULONG
Definition: retypes.h:1

Referenced by IAssemblyCacheImpl_QueryAssemblyInfo(), and IAssemblyCacheImpl_UninstallAssembly().

◆ IAssemblyName_SetPath()

HRESULT IAssemblyName_SetPath ( IAssemblyName iface,
LPCWSTR  path 
)

Definition at line 521 of file asmname.c.

522 {
524 
525  name->path = strdupW(path);
526  if (!name->path)
527  return E_OUTOFMEMORY;
528 
529  return S_OK;
530 }
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
static IAssemblyNameImpl * unsafe_impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:514
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:59
Definition: services.c:325
Definition: name.c:36

Referenced by enum_gac_assemblies().

◆ IAssemblyNameImpl_AddRef()

static ULONG WINAPI IAssemblyNameImpl_AddRef ( IAssemblyName iface)
static

Definition at line 99 of file asmname.c.

100 {
102  ULONG refCount = InterlockedIncrement(&This->ref);
103 
104  TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
105 
106  return refCount;
107 }
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IAssemblyNameImpl_Clone()

static HRESULT WINAPI IAssemblyNameImpl_Clone ( IAssemblyName iface,
IAssemblyName **  pName 
)
static

Definition at line 491 of file asmname.c.

493 {
494  FIXME("(%p, %p) stub!\n", iface, pName);
495  return E_NOTIMPL;
496 }
#define FIXME(fmt,...)
Definition: debug.h:110
static LPSTR pName
Definition: security.c:75
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IAssemblyNameImpl_Finalize()

static HRESULT WINAPI IAssemblyNameImpl_Finalize ( IAssemblyName iface)
static

Definition at line 256 of file asmname.c.

257 {
258  FIXME("(%p) stub!\n", iface);
259  return E_NOTIMPL;
260 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IAssemblyNameImpl_GetDisplayName()

static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName ( IAssemblyName iface,
LPOLESTR  szDisplayName,
LPDWORD  pccDisplayName,
DWORD  dwDisplayFlags 
)
static

Definition at line 262 of file asmname.c.

266 {
267  static const WCHAR equals[] = {'=',0};
269  WCHAR verstr[30], *cultureval = NULL;
270  DWORD size;
271 
272  TRACE("(%p, %p, %p, %d)\n", iface, szDisplayName,
273  pccDisplayName, dwDisplayFlags);
274 
275  if (dwDisplayFlags == 0)
276  {
277  if (!name->displayname || !*name->displayname)
278  return FUSION_E_INVALID_NAME;
279 
280  size = strlenW(name->displayname) + 1;
281 
282  if (*pccDisplayName < size)
283  {
284  *pccDisplayName = size;
286  }
287 
288  if (szDisplayName) strcpyW(szDisplayName, name->displayname);
289  *pccDisplayName = size;
290 
291  return S_OK;
292  }
293 
294  if (!name->name || !*name->name)
295  return FUSION_E_INVALID_NAME;
296 
297  /* Verify buffer size is sufficient */
298  size = lstrlenW(name->name) + 1;
299 
300  if ((dwDisplayFlags & ASM_DISPLAYF_VERSION) && (name->versize > 0))
301  {
302  static const WCHAR spec[] = {'%','d',0};
303  static const WCHAR period[] = {'.',0};
304  DWORD i;
305 
306  wsprintfW(verstr, spec, name->version[0]);
307 
308  for (i = 1; i < name->versize; i++)
309  {
310  WCHAR value[6];
311  wsprintfW(value, spec, name->version[i]);
312 
313  lstrcatW(verstr, period);
314  lstrcatW(verstr, value);
315  }
316 
317  size += lstrlenW(separator) + lstrlenW(version) + lstrlenW(equals) + lstrlenW(verstr);
318  }
319 
320  if ((dwDisplayFlags & ASM_DISPLAYF_CULTURE) && (name->culture))
321  {
322  static const WCHAR neutral[] = {'n','e','u','t','r','a','l', 0};
323 
324  cultureval = (lstrlenW(name->culture) == 2) ? name->culture : (LPWSTR) neutral;
325  size += lstrlenW(separator) + lstrlenW(culture) + lstrlenW(equals) + lstrlenW(cultureval);
326  }
327 
328  if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
330 
331  if ((dwDisplayFlags & ASM_DISPLAYF_PROCESSORARCHITECTURE) && (name->procarch))
332  size += lstrlenW(separator) + lstrlenW(procarch) + lstrlenW(equals) + lstrlenW(name->procarch);
333 
334  if (size > *pccDisplayName)
335  {
336  *pccDisplayName = size;
338  }
339 
340  /* Construct the string */
341  lstrcpyW(szDisplayName, name->name);
342 
343  if ((dwDisplayFlags & ASM_DISPLAYF_VERSION) && (name->versize > 0))
344  {
345  lstrcatW(szDisplayName, separator);
346 
347  lstrcatW(szDisplayName, version);
348  lstrcatW(szDisplayName, equals);
349  lstrcatW(szDisplayName, verstr);
350  }
351 
352  if ((dwDisplayFlags & ASM_DISPLAYF_CULTURE) && (name->culture))
353  {
354  lstrcatW(szDisplayName, separator);
355 
356  lstrcatW(szDisplayName, culture);
357  lstrcatW(szDisplayName, equals);
358  lstrcatW(szDisplayName, cultureval);
359  }
360 
361  if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
362  {
363  WCHAR pkt[CHARS_PER_PUBKEY + 1];
364  static const WCHAR spec[] = {'%','0','2','x','%','0','2','x','%','0','2','x',
365  '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',0};
366 
367  lstrcatW(szDisplayName, separator);
368 
369  lstrcatW(szDisplayName, pubkey);
370  lstrcatW(szDisplayName, equals);
371 
372  wsprintfW(pkt, spec, name->pubkey[0], name->pubkey[1], name->pubkey[2],
373  name->pubkey[3], name->pubkey[4], name->pubkey[5], name->pubkey[6],
374  name->pubkey[7]);
375 
376  lstrcatW(szDisplayName, pkt);
377  }
378 
379  if ((dwDisplayFlags & ASM_DISPLAYF_PROCESSORARCHITECTURE) && (name->procarch))
380  {
381  lstrcatW(szDisplayName, separator);
382 
383  lstrcatW(szDisplayName, procarch);
384  lstrcatW(szDisplayName, equals);
385  lstrcatW(szDisplayName, name->procarch);
386  }
387 
388  *pccDisplayName = size;
389  return S_OK;
390 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
static const WCHAR separator[]
Definition: asmname.c:63
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
WCHAR * version
Definition: name.c:44
static const WCHAR pubkey[]
Definition: asmname.c:66
#define CHARS_PER_PUBKEY
Definition: asmname.c:71
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
#define lstrlenW
Definition: compat.h:407
static const WCHAR procarch[]
Definition: asmname.c:68
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define FUSION_E_INVALID_NAME
Definition: corerror.h:123
unsigned long DWORD
Definition: ntddk_ex.h:95
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define lstrcpyW
Definition: compat.h:406
Definition: name.c:36
static const WCHAR culture[]
Definition: asmname.c:65
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
WCHAR * LPWSTR
Definition: xmlstorage.h:184
WCHAR * name
Definition: name.c:40

◆ IAssemblyNameImpl_GetName()

static HRESULT WINAPI IAssemblyNameImpl_GetName ( IAssemblyName iface,
LPDWORD  lpcwBuffer,
WCHAR pwzName 
)
static

Definition at line 410 of file asmname.c.

413 {
415  DWORD len;
416 
417  TRACE("(%p, %p, %p)\n", iface, lpcwBuffer, pwzName);
418 
419  if (name->name)
420  len = strlenW(name->name) + 1;
421  else
422  len = 0;
423 
424  if (*lpcwBuffer < len)
425  {
426  *lpcwBuffer = len;
428  }
429  if (!name->name) lpcwBuffer[0] = 0;
430  else strcpyW(pwzName, name->name);
431 
432  *lpcwBuffer = len;
433  return S_OK;
434 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
Definition: name.c:36
WCHAR * name
Definition: name.c:40

◆ IAssemblyNameImpl_GetProperty()

static HRESULT WINAPI IAssemblyNameImpl_GetProperty ( IAssemblyName iface,
DWORD  PropertyId,
LPVOID  pvProperty,
LPDWORD  pcbProperty 
)
static

Definition at line 138 of file asmname.c.

142 {
144  DWORD size;
145 
146  TRACE("(%p, %d, %p, %p)\n", iface, PropertyId, pvProperty, pcbProperty);
147 
148  size = *pcbProperty;
149  switch (PropertyId)
150  {
151  case ASM_NAME_NULL_PUBLIC_KEY:
152  case ASM_NAME_NULL_PUBLIC_KEY_TOKEN:
153  if (name->haspubkey)
154  return S_OK;
155  return S_FALSE;
156 
157  case ASM_NAME_NULL_CUSTOM:
158  return S_OK;
159 
160  case ASM_NAME_NAME:
161  *pcbProperty = 0;
162  if (name->name)
163  {
164  *pcbProperty = (lstrlenW(name->name) + 1) * 2;
165  if (size < *pcbProperty)
167  lstrcpyW(pvProperty, name->name);
168  }
169  break;
170 
171  case ASM_NAME_MAJOR_VERSION:
172  *pcbProperty = 0;
173  if (name->versize >= 1)
174  {
175  *pcbProperty = sizeof(WORD);
176  if (size < *pcbProperty)
178  *((WORD *)pvProperty) = name->version[0];
179  }
180  break;
181 
182  case ASM_NAME_MINOR_VERSION:
183  *pcbProperty = 0;
184  if (name->versize >= 2)
185  {
186  *pcbProperty = sizeof(WORD);
187  if (size < *pcbProperty)
189  *((WORD *)pvProperty) = name->version[1];
190  }
191  break;
192 
193  case ASM_NAME_BUILD_NUMBER:
194  *pcbProperty = 0;
195  if (name->versize >= 3)
196  {
197  *pcbProperty = sizeof(WORD);
198  if (size < *pcbProperty)
200  *((WORD *)pvProperty) = name->version[2];
201  }
202  break;
203 
204  case ASM_NAME_REVISION_NUMBER:
205  *pcbProperty = 0;
206  if (name->versize >= 4)
207  {
208  *pcbProperty = sizeof(WORD);
209  if (size < *pcbProperty)
211  *((WORD *)pvProperty) = name->version[3];
212  }
213  break;
214 
215  case ASM_NAME_CULTURE:
216  *pcbProperty = 0;
217  if (name->culture)
218  {
219  *pcbProperty = (lstrlenW(name->culture) + 1) * 2;
220  if (size < *pcbProperty)
222  lstrcpyW(pvProperty, name->culture);
223  }
224  break;
225 
226  case ASM_NAME_PUBLIC_KEY_TOKEN:
227  *pcbProperty = 0;
228  if (name->haspubkey)
229  {
230  *pcbProperty = sizeof(DWORD) * 2;
231  if (size < *pcbProperty)
233  memcpy(pvProperty, name->pubkey, sizeof(DWORD) * 2);
234  }
235  break;
236 
237  case ASM_NAME_ARCHITECTURE:
238  *pcbProperty = 0;
239  if (name->pekind != peNone)
240  {
241  *pcbProperty = sizeof(PEKIND);
242  if (size < *pcbProperty)
244  *((PEKIND *)pvProperty) = name->pekind;
245  }
246  break;
247 
248  default:
249  *pcbProperty = 0;
250  break;
251  }
252 
253  return S_OK;
254 }
WCHAR * version
Definition: name.c:44
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: classpnp.h:966
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
#define lstrlenW
Definition: compat.h:407
#define STRSAFE_E_INSUFFICIENT_BUFFER
Definition: strsafe.h:103
#define DWORD
Definition: nt_native.h:44
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
PEKIND
Definition: fusion.idl:35
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59
#define lstrcpyW
Definition: compat.h:406
Definition: name.c:36
WCHAR * name
Definition: name.c:40

◆ IAssemblyNameImpl_GetVersion()

static HRESULT WINAPI IAssemblyNameImpl_GetVersion ( IAssemblyName iface,
LPDWORD  pdwVersionHi,
LPDWORD  pdwVersionLow 
)
static

Definition at line 436 of file asmname.c.

439 {
441 
442  TRACE("(%p, %p, %p)\n", iface, pdwVersionHi, pdwVersionLow);
443 
444  *pdwVersionHi = 0;
445  *pdwVersionLow = 0;
446 
447  if (name->versize != 4)
448  return FUSION_E_INVALID_NAME;
449 
450  *pdwVersionHi = (name->version[0] << 16) + name->version[1];
451  *pdwVersionLow = (name->version[2] << 16) + name->version[3];
452 
453  return S_OK;
454 }
WCHAR * version
Definition: name.c:44
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
#define TRACE(s)
Definition: solgame.cpp:4
#define FUSION_E_INVALID_NAME
Definition: corerror.h:123
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36

◆ IAssemblyNameImpl_IsEqual()

static HRESULT WINAPI IAssemblyNameImpl_IsEqual ( IAssemblyName iface,
IAssemblyName pName,
DWORD  flags 
)
static

Definition at line 456 of file asmname.c.

459 {
462 
463  TRACE("(%p, %p, 0x%08x)\n", iface, pName, flags);
464 
465  if (!pName) return S_FALSE;
466  if (flags & ~ASM_CMPF_IL_ALL) FIXME("unsupported flags\n");
467 
468  if ((flags & ASM_CMPF_NAME) && strcmpW(name1->name, name2->name)) return S_FALSE;
469  if (name1->versize && name2->versize)
470  {
471  if ((flags & ASM_CMPF_MAJOR_VERSION) &&
472  name1->version[0] != name2->version[0]) return S_FALSE;
473  if ((flags & ASM_CMPF_MINOR_VERSION) &&
474  name1->version[1] != name2->version[1]) return S_FALSE;
475  if ((flags & ASM_CMPF_BUILD_NUMBER) &&
476  name1->version[2] != name2->version[2]) return S_FALSE;
477  if ((flags & ASM_CMPF_REVISION_NUMBER) &&
478  name1->version[3] != name2->version[3]) return S_FALSE;
479  }
480  if ((flags & ASM_CMPF_PUBLIC_KEY_TOKEN) &&
481  name1->haspubkey && name2->haspubkey &&
482  memcmp(name1->pubkey, name2->pubkey, sizeof(name1->pubkey))) return S_FALSE;
483 
484  if ((flags & ASM_CMPF_CULTURE) &&
485  name1->culture && name2->culture &&
486  strcmpW(name1->culture, name2->culture)) return S_FALSE;
487 
488  return S_OK;
489 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
static WCHAR name1[]
Definition: record.c:34
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
static LPSTR pName
Definition: security.c:75
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static WCHAR name2[]
Definition: record.c:35

◆ IAssemblyNameImpl_QueryInterface()

static HRESULT WINAPI IAssemblyNameImpl_QueryInterface ( IAssemblyName iface,
REFIID  riid,
LPVOID ppobj 
)
static

Definition at line 78 of file asmname.c.

80 {
82 
83  TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
84 
85  *ppobj = NULL;
86 
87  if (IsEqualIID(riid, &IID_IUnknown) ||
88  IsEqualIID(riid, &IID_IAssemblyName))
89  {
90  IAssemblyName_AddRef(iface);
91  *ppobj = &This->IAssemblyName_iface;
92  return S_OK;
93  }
94 
95  WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
96  return E_NOINTERFACE;
97 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IAssemblyNameImpl_Release()

static ULONG WINAPI IAssemblyNameImpl_Release ( IAssemblyName iface)
static

Definition at line 109 of file asmname.c.

110 {
112  ULONG refCount = InterlockedDecrement(&This->ref);
113 
114  TRACE("(%p)->(ref before = %u)\n", This, refCount + 1);
115 
116  if (!refCount)
117  {
118  heap_free(This->path);
119  heap_free(This->displayname);
120  heap_free(This->name);
121  heap_free(This->culture);
122  heap_free(This->procarch);
123  heap_free(This);
124  }
125 
126  return refCount;
127 }
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ IAssemblyNameImpl_Reserved()

static HRESULT WINAPI IAssemblyNameImpl_Reserved ( IAssemblyName iface,
REFIID  refIID,
IUnknown pUnkReserved1,
IUnknown pUnkReserved2,
LPCOLESTR  szReserved,
LONGLONG  llReserved,
LPVOID  pvReserved,
DWORD  cbReserved,
LPVOID ppReserved 
)
static

Definition at line 392 of file asmname.c.

401 {
402  TRACE("(%p, %s, %p, %p, %s, %s, %p, %d, %p)\n", iface,
403  debugstr_guid(refIID), pUnkReserved1, pUnkReserved2,
404  debugstr_w(szReserved), wine_dbgstr_longlong(llReserved),
405  pvReserved, cbReserved, ppReserved);
406 
407  return E_NOTIMPL;
408 }
static LPCWSTR DWORD LPVOID pvReserved
Definition: asmname.c:40
#define debugstr_w
Definition: kernel32.h:32
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ IAssemblyNameImpl_SetProperty()

static HRESULT WINAPI IAssemblyNameImpl_SetProperty ( IAssemblyName iface,
DWORD  PropertyId,
LPVOID  pvProperty,
DWORD  cbProperty 
)
static

Definition at line 129 of file asmname.c.

133 {
134  FIXME("(%p, %d, %p, %d) stub!\n", iface, PropertyId, pvProperty, cbProperty);
135  return E_NOTIMPL;
136 }
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: classpnp.h:966
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ impl_from_IAssemblyName()

static IAssemblyNameImpl* impl_from_IAssemblyName ( IAssemblyName iface)
inlinestatic

Definition at line 73 of file asmname.c.

74 {
75  return CONTAINING_RECORD(iface, IAssemblyNameImpl, IAssemblyName_iface);
76 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by IAssemblyNameImpl_AddRef(), IAssemblyNameImpl_GetDisplayName(), IAssemblyNameImpl_GetName(), IAssemblyNameImpl_GetProperty(), IAssemblyNameImpl_GetVersion(), IAssemblyNameImpl_IsEqual(), IAssemblyNameImpl_QueryInterface(), IAssemblyNameImpl_Release(), and unsafe_impl_from_IAssemblyName().

◆ is_hex()

static BOOL is_hex ( WCHAR  c)
static

Definition at line 590 of file asmname.c.

591 {
592  return ((c >= 'a' && c <= 'f') ||
593  (c >= 'A' && c <= 'F') ||
594  (c >= '0' && c <= '9'));
595 }
const GLubyte * c
Definition: glext.h:8905

Referenced by parse_pubkey().

◆ parse_culture()

static HRESULT parse_culture ( IAssemblyNameImpl name,
LPCWSTR  culture 
)
static

Definition at line 578 of file asmname.c.

579 {
580  static const WCHAR empty[] = {0};
581 
582  if (lstrlenW(culture) == 2)
583  name->culture = strdupW(culture);
584  else
585  name->culture = strdupW(empty);
586 
587  return S_OK;
588 }
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
static const WCHAR empty[]
Definition: main.c:49
#define lstrlenW
Definition: compat.h:407
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
static const WCHAR culture[]
Definition: asmname.c:65

Referenced by parse_display_name().

◆ parse_display_name()

static HRESULT parse_display_name ( IAssemblyNameImpl name,
LPCWSTR  szAssemblyName 
)
static

Definition at line 682 of file asmname.c.

683 {
684  LPWSTR str, save, ptr, ptr2, value;
685  HRESULT hr = S_OK;
686  BOOL done = FALSE;
687 
688  if (!szAssemblyName)
689  return S_OK;
690 
691  name->displayname = strdupW(szAssemblyName);
692  if (!name->displayname)
693  return E_OUTOFMEMORY;
694 
696  save = str;
697  if (!str)
698  {
699  hr = E_OUTOFMEMORY;
700  goto done;
701  }
702 
703  ptr = strchrW(str, ',');
704  if (ptr) *ptr = '\0';
705 
706  /* no ',' but ' ' only */
707  if( !ptr && strchrW(str, ' ') )
708  {
710  goto done;
711  }
712 
713  name->name = strdupW(str);
714  if (!name->name)
715  {
716  hr = E_OUTOFMEMORY;
717  goto done;
718  }
719 
720  if (!ptr)
721  goto done;
722 
723  str = ptr + 1;
724  while (!done)
725  {
726  ptr = strchrW(str, '=');
727  if (!ptr)
728  {
730  goto done;
731  }
732 
733  *(ptr++) = '\0';
734  if (!*ptr)
735  {
737  goto done;
738  }
739 
740  if (!(ptr2 = strchrW(ptr, ',')))
741  {
742  if (!(ptr2 = strchrW(ptr, '\0')))
743  {
745  goto done;
746  }
747 
748  done = TRUE;
749  }
750 
751  *ptr2 = '\0';
752  if (!(value = parse_value( ptr, ptr2 - ptr )))
753  {
755  goto done;
756  }
757  while (*str == ' ') str++;
758 
759  if (!lstrcmpiW(str, version))
760  hr = parse_version( name, value );
761  else if (!lstrcmpiW(str, culture))
762  hr = parse_culture( name, value );
763  else if (!lstrcmpiW(str, pubkey))
764  hr = parse_pubkey( name, value );
765  else if (!lstrcmpiW(str, procarch))
766  {
767  name->procarch = value;
768  value = NULL;
769 
770  hr = parse_procarch( name, name->procarch );
771  }
772  heap_free( value );
773 
774  if (FAILED(hr))
775  goto done;
776 
777  str = ptr2 + 1;
778  }
779 
780 done:
781  heap_free(save);
782  if (FAILED(hr))
783  {
784  heap_free(name->displayname);
785  heap_free(name->name);
786  heap_free(name->culture);
787  heap_free(name->procarch);
788  }
789  return hr;
790 }
static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
Definition: asmname.c:553
#define TRUE
Definition: types.h:120
static WCHAR * parse_value(const WCHAR *str, unsigned int len)
Definition: asmname.c:659
HRESULT hr
Definition: shlfolder.c:183
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
static const WCHAR pubkey[]
Definition: asmname.c:66
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
static LPCWSTR szAssemblyName
Definition: asmname.c:40
static const WCHAR procarch[]
Definition: asmname.c:68
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
static HRESULT parse_procarch(IAssemblyNameImpl *name, LPCWSTR procarch)
Definition: asmname.c:635
LONG HRESULT
Definition: typedefs.h:77
#define FUSION_E_INVALID_NAME
Definition: corerror.h:123
static HRESULT parse_culture(IAssemblyNameImpl *name, LPCWSTR culture)
Definition: asmname.c:578
GLsizei const GLfloat * value
Definition: glext.h:6069
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
static const WCHAR culture[]
Definition: asmname.c:65
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey)
Definition: asmname.c:608
WCHAR * name
Definition: name.c:40
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by CreateAssemblyNameObject().

◆ parse_procarch()

static HRESULT parse_procarch ( IAssemblyNameImpl name,
LPCWSTR  procarch 
)
static

Definition at line 635 of file asmname.c.

636 {
637  static const WCHAR msilW[] = {'m','s','i','l',0};
638  static const WCHAR x86W[] = {'x','8','6',0};
639  static const WCHAR ia64W[] = {'i','a','6','4',0};
640  static const WCHAR amd64W[] = {'a','m','d','6','4',0};
641 
642  if (!lstrcmpiW(procarch, msilW))
643  name->pekind = peMSIL;
644  else if (!lstrcmpiW(procarch, x86W))
645  name->pekind = peI386;
646  else if (!lstrcmpiW(procarch, ia64W))
647  name->pekind = peIA64;
648  else if (!lstrcmpiW(procarch, amd64W))
649  name->pekind = peAMD64;
650  else
651  {
652  ERR("unrecognized architecture: %s\n", wine_dbgstr_w(procarch));
653  return FUSION_E_INVALID_NAME;
654  }
655 
656  return S_OK;
657 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
static const WCHAR procarch[]
Definition: asmname.c:68
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define FUSION_E_INVALID_NAME
Definition: corerror.h:123
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36

Referenced by parse_display_name().

◆ parse_pubkey()

static HRESULT parse_pubkey ( IAssemblyNameImpl name,
LPCWSTR  pubkey 
)
static

Definition at line 608 of file asmname.c.

609 {
610  int i;
611  BYTE val;
612  static const WCHAR nullstr[] = {'n','u','l','l',0};
613 
614  if(lstrcmpiW(pubkey, nullstr) == 0)
616 
618  return FUSION_E_INVALID_NAME;
619 
620  for (i = 0; i < CHARS_PER_PUBKEY; i++)
621  if (!is_hex(pubkey[i]))
622  return FUSION_E_INVALID_NAME;
623 
624  name->haspubkey = TRUE;
625 
626  for (i = 0; i < CHARS_PER_PUBKEY; i += 2)
627  {
628  val = (hextobyte(pubkey[i]) << 4) + hextobyte(pubkey[i + 1]);
629  name->pubkey[i / 2] = val;
630  }
631 
632  return S_OK;
633 }
#define TRUE
Definition: types.h:120
static const WCHAR pubkey[]
Definition: asmname.c:66
#define FUSION_E_PRIVATE_ASM_DISALLOWED
Definition: corerror.h:122
#define CHARS_PER_PUBKEY
Definition: asmname.c:71
#define lstrlenW
Definition: compat.h:407
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
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
Definition: glfuncs.h:248
static BOOL is_hex(WCHAR c)
Definition: asmname.c:590
GLuint GLfloat * val
Definition: glext.h:7180
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define FUSION_E_INVALID_NAME
Definition: corerror.h:123
unsigned char BYTE
Definition: mem.h:68
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
static BYTE hextobyte(WCHAR c)
Definition: asmname.c:597

Referenced by parse_display_name().

◆ parse_value()

static WCHAR* parse_value ( const WCHAR str,
unsigned int  len 
)
static

Definition at line 659 of file asmname.c.

660 {
661  WCHAR *ret;
662  const WCHAR *p = str;
663  BOOL quoted = FALSE;
664  unsigned int i = 0;
665 
666  if (!(ret = heap_alloc( (len + 1) * sizeof(WCHAR) ))) return NULL;
667  if (*p == '\"')
668  {
669  quoted = TRUE;
670  p++;
671  }
672  while (*p && *p != '\"') ret[i++] = *p++;
673  if ((quoted && *p != '\"') || (!quoted && *p == '\"'))
674  {
675  heap_free( ret );
676  return NULL;
677  }
678  ret[i] = 0;
679  return ret;
680 }
#define TRUE
Definition: types.h:120
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
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
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
GLenum GLsizei len
Definition: glext.h:6722
GLfloat GLfloat p
Definition: glext.h:8902
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by parse_display_name().

◆ parse_version()

static HRESULT parse_version ( IAssemblyNameImpl name,
LPWSTR  version 
)
static

Definition at line 553 of file asmname.c.

554 {
555  LPWSTR beg, end;
556  int i;
557 
558  for (i = 0, beg = version; i < 4; i++)
559  {
560  if (!*beg)
561  return S_OK;
562 
563  end = strchrW(beg, '.');
564 
565  if (end) *end = '\0';
566  name->version[i] = atolW(beg);
567  name->versize++;
568 
569  if (!end && i < 3)
570  return S_OK;
571 
572  beg = end + 1;
573  }
574 
575  return S_OK;
576 }
WCHAR * version
Definition: name.c:44
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
GLuint GLuint end
Definition: gl.h:1545
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
Definition: glfuncs.h:248
static const WCHAR version[]
Definition: asmname.c:64
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
Definition: unicode.h:310
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by parse_display_name().

◆ unsafe_impl_from_IAssemblyName()

static IAssemblyNameImpl* unsafe_impl_from_IAssemblyName ( IAssemblyName iface)
inlinestatic

Definition at line 514 of file asmname.c.

515 {
516  assert(iface->lpVtbl == &AssemblyNameVtbl);
517 
518  return impl_from_IAssemblyName(iface);
519 }
#define assert(x)
Definition: debug.h:53
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
static const IAssemblyNameVtbl AssemblyNameVtbl
Definition: asmname.c:498

Referenced by IAssemblyName_GetPath(), and IAssemblyName_SetPath().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( fusion  )

Variable Documentation

◆ AssemblyNameVtbl

const IAssemblyNameVtbl AssemblyNameVtbl
static
Initial value:
= {
}
static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, LPDWORD pcbProperty)
Definition: asmname.c:138
static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface, LPDWORD lpcwBuffer, WCHAR *pwzName)
Definition: asmname.c:410
static HRESULT WINAPI IAssemblyNameImpl_Finalize(IAssemblyName *iface)
Definition: asmname.c:256
static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface, LPDWORD pdwVersionHi, LPDWORD pdwVersionLow)
Definition: asmname.c:436
static HRESULT WINAPI IAssemblyNameImpl_SetProperty(IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, DWORD cbProperty)
Definition: asmname.c:129
static HRESULT WINAPI IAssemblyNameImpl_Clone(IAssemblyName *iface, IAssemblyName **pName)
Definition: asmname.c:491
static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface, IAssemblyName *pName, DWORD flags)
Definition: asmname.c:456
static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
Definition: asmname.c:99
static HRESULT WINAPI IAssemblyNameImpl_Reserved(IAssemblyName *iface, REFIID refIID, IUnknown *pUnkReserved1, IUnknown *pUnkReserved2, LPCOLESTR szReserved, LONGLONG llReserved, LPVOID pvReserved, DWORD cbReserved, LPVOID *ppReserved)
Definition: asmname.c:392
static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface, LPOLESTR szDisplayName, LPDWORD pccDisplayName, DWORD dwDisplayFlags)
Definition: asmname.c:262
static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface, REFIID riid, LPVOID *ppobj)
Definition: asmname.c:78
static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface)
Definition: asmname.c:109

Definition at line 498 of file asmname.c.

Referenced by CreateAssemblyNameObject(), and unsafe_impl_from_IAssemblyName().

◆ culture

◆ procarch

const WCHAR procarch[]
static
Initial value:
= {'p','r','o','c','e','s','s','o','r',
'A','r','c','h','i','t','e','c','t','u','r','e',0}

Definition at line 68 of file asmname.c.

Referenced by IAssemblyNameImpl_GetDisplayName(), parse_display_name(), and parse_procarch().

◆ pubkey

const WCHAR pubkey[]
static
Initial value:
=
{'P','u','b','l','i','c','K','e','y','T','o','k','e','n',0}

Definition at line 66 of file asmname.c.

Referenced by assembly_get_pubkey_token(), CryptImportKey(), IAssemblyNameImpl_GetDisplayName(), parse_display_name(), parse_pubkey(), and test_QueryAssemblyInfo().

◆ separator

◆ version

const WCHAR version[] = {'V','e','r','s','i','o','n',0}
static

Definition at line 64 of file asmname.c.

Referenced by __rpcb_findaddr_timed(), _TestVesion(), acmGetVersion(), ACTION_FileVersionMatches(), add_widl_version_define(), assembly_get_runtime_version(), assembly_get_version(), build_assembly_id(), build_assembly_name(), build_file_mask(), build_header_request_string(), build_manifest_filename(), build_manifest_path(), build_policy_filename(), build_policy_path(), build_request_header(), cache_QueryAssemblyInfo(), cache_UninstallAssembly(), CHashEncodeMsg_GetParam(), check_tiff_format(), check_version(), clnt_dg_create(), CLRMetaHost_GetVersionFromFile(), CLRRuntimeInfo_GetRuntimeDirectory(), CLRRuntimeInfo_GetVersionString(), CLRRuntimeInfo_LoadLibrary(), CompareStringEx(), component_GetVersion(), component_IsThisVersionInstalled(), create_database_wordcount(), create_msft_typelib(), create_webbrowser(), create_writer(), CreateDebuggingInterfaceFromVersion(), CRYPT_AsnDecodeCMSSignedInfo(), CRYPT_AsnDecodePKCSDigestedData(), CRYPT_AsnDecodePKCSEnvelopedData(), CRYPT_AsnDecodeRsaPrivKey(), d3d_device_create(), d3d_device_init(), d3drm_device_init(), D3DXDisassembleShader(), D3DXFindShaderComment(), ddraw_surface_create(), ddraw_surface_init(), debugstr_dmversion(), deflateInit2_(), deflateInit_(), DetectPlatform(), DirectInput8Create(), DllMain(), enum_gac_assemblies(), examine_app14(), filesys_GetFileVersion(), fill_keyboard_dideviceinstanceA(), fill_keyboard_dideviceinstanceW(), fill_mouse_dideviceinstanceA(), fill_mouse_dideviceinstanceW(), fill_processor(), find_builtin_prop(), get_app_version(), get_assembly_directory(), get_clr_version(), get_clr_version_str(), get_corversion(), get_file_version(), get_mono_path_from_registry(), get_msxml_version(), get_processor_version(), get_runtime_info(), get_version_info(), get_versionstring(), GetCachePath(), GetUIVersion(), gl_GetString(), glsl_is_shadow_sampler(), gxv_bsln_validate(), gxv_just_validate(), gxv_kern_subtable_validate(), gxv_kern_validate_generic(), gxv_lcar_validate(), gxv_mort_validate(), gxv_morx_validate(), gxv_opbd_validate(), gxv_prop_property_validate(), gxv_prop_validate(), gxv_trak_validate(), hash_basename(), HTMLDOMImplementation_hasFeature(), HttpCreateServerSession(), HttpInitialize(), IAssemblyCacheImpl_InstallAssembly(), IAssemblyNameImpl_GetDisplayName(), IDirectInput8AImpl_Initialize(), IDirectInput8WImpl_Initialize(), IDirectInputAImpl_Initialize(), ImmGetVirtualKey(), inflateBackInit_(), inflateInit2_(), inflateInit_(), InstallerImpl_Version(), is_vertex_shader(), iso_recv_msg(), ITERATE_UnregisterTypeLibraries(), joystick_tests(), jpeg_CreateCompress(), jpeg_CreateDecompress(), JSPROXY_InternetInitializeAutoProxyDll(), keyboard_tests(), keyboarddev_enum_deviceA(), keyboarddev_enum_deviceW(), LCMapStringEx(), ldap_startup(), lineGetCountryW(), load_wine_gecko_v(), LoadLibraryShim(), LoadMenuIndirectW(), main(), match_languages(), MetadataReaderInfo_GetSpecVersion(), MetadataReaderInfo_GetVersion(), mousedev_enum_deviceA(), mousedev_enum_deviceW(), msi_compare_file_versions(), msi_font_version_from_file(), msi_get_disk_file_version(), MSI_GetComponentPath(), msi_version_str_to_dword(), MsiGetFileVersionW(), MSSTYLES_OpenThemeFile(), MXWriter_create(), mxwriter_get_version(), mxwriter_put_version(), name_GetDisplayName(), name_GetVersion(), nfs41_mount(), nfs41_send_compound(), nfs41_shutdown_daemon(), nfs41_unmount(), nfs41_UpcallCreate(), OLEFontImpl_Load(), OLEFontImpl_Save(), OpenBookmarkFile(), otv_BASE_validate(), otv_GDEF_validate(), otv_GPOS_validate(), otv_GSUB_validate(), output_typelib_regscript(), XMLStorage::XMLReaderBase::parse(), parse_assembly_elem(), parse_cie_details(), parse_display_name(), parse_runtime_version(), parse_supported_runtime(), parse_version(), ParseFile(), PdhGetDllVersion(), per_user_install_callback(), pmap_getport(), pmap_set(), pmap_unset(), pointer_default(), PRINTF_ATTR(), process_pdu_logon(), profile3_GetVersion(), CCMIAdapter::queryChip(), read_version_entry(), rpc_should_retry(), rpcb_getaddr(), rpcb_set(), rpcb_unset(), SAXAttributes_create(), SdbpReadFileVersion(), SECUR32_initNTLMSP(), set_msi_assembly_prop(), SetPerUserSecValuesW(), sfnt_init_face(), sfnt_open_font(), shader_generate_glsl_declarations(), shader_glsl_atomic(), shader_glsl_gen_sample_c_lz(), shader_glsl_generate_pshader(), shader_glsl_generate_vshader(), shader_glsl_get_register_name(), shader_glsl_ld_uav(), shader_glsl_load_constants_f(), shader_glsl_resinfo(), shader_glsl_ret(), shader_glsl_store_uav(), START_TEST(), Status(), TcRegisterClient(), test_appsearch_drlocator(), test_appsearch_inilocator(), test_appsearch_reglocator(), test_assoc_perceived(), test_find_surrogate(), test_GetCachePath(), test_GetFileVersion(), test_GetTempPathW(), test_height_selection_vdmx(), test_ldap_get_optionW(), test_MsiGetFileVersion(), test_OleDoAutoConvert(), test_pack_SHELLSTATE(), test_PdhGetDllVersion(), test_request_parameter_defaults(), test_service_flags(), test_text_metrics(), test_UuidCreate(), test_UuidCreateSequential(), test_version(), test_versioninfo(), test_WithWSAStartup(), TestV5VersionMessage(), TestVersionMessage(), tt_face_get_kerning(), tt_face_load_maxp(), tt_face_load_os2(), UniataAhciDetect(), UniAtaAhciValidateVersion(), upcall_parse(), update_heap_entry(), VfdOpenDevice(), walk_constant_heap(), walk_constant_heap_clamped(), warning(), WinHttpOpenRequest(), WMProfileManager_CreateEmptyProfile(), write_coclass(), write_msi_summary_info(), write_typelib_interface(), xmlCheckVersion(), XMLStorage::XMLReaderBase::XmlDeclHandler(), xmlParseTextDecl(), xmlParseVersionInfo(), xmlParseXMLDecl(), xmlSAXVersion(), xsltApplyStylesheetInternal(), xsltDocumentElem(), and xsltGetHTMLIDs().