ReactOS  0.4.14-dev-337-gf981a68
name.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "winsxs.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "sxs_private.h"
Include dependency graph for name.c:

Go to the source code of this file.

Classes

struct  name
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (sxs)
 
static struct nameimpl_from_IAssemblyName (IAssemblyName *iface)
 
static HRESULT WINAPI name_QueryInterface (IAssemblyName *iface, REFIID riid, void **obj)
 
static ULONG WINAPI name_AddRef (IAssemblyName *iface)
 
static ULONG WINAPI name_Release (IAssemblyName *iface)
 
static HRESULT WINAPI name_SetProperty (IAssemblyName *iface, DWORD id, LPVOID property, DWORD size)
 
static HRESULT WINAPI name_GetProperty (IAssemblyName *iface, DWORD id, LPVOID buffer, LPDWORD buflen)
 
static HRESULT WINAPI name_Finalize (IAssemblyName *iface)
 
static HRESULT WINAPI name_GetDisplayName (IAssemblyName *iface, LPOLESTR buffer, LPDWORD buflen, DWORD flags)
 
static HRESULT WINAPI name_Reserved (IAssemblyName *iface, REFIID riid, IUnknown *pUnkReserved1, IUnknown *pUnkReserved2, LPCOLESTR szReserved, LONGLONG llReserved, LPVOID pvReserved, DWORD cbReserved, LPVOID *ppReserved)
 
const WCHARget_name_attribute (IAssemblyName *iface, enum name_attr_id id)
 
static HRESULT WINAPI name_GetName (IAssemblyName *iface, LPDWORD buflen, WCHAR *buffer)
 
static HRESULT parse_version (WCHAR *version, DWORD *high, DWORD *low)
 
static HRESULT WINAPI name_GetVersion (IAssemblyName *iface, LPDWORD high, LPDWORD low)
 
static HRESULT WINAPI name_IsEqual (IAssemblyName *name1, IAssemblyName *name2, DWORD flags)
 
static HRESULT WINAPI name_Clone (IAssemblyName *iface, IAssemblyName **name)
 
static WCHARparse_value (const WCHAR *str, unsigned int *len)
 
static HRESULT parse_displayname (struct name *name, const WCHAR *displayname)
 
HRESULT WINAPI CreateAssemblyNameObject (LPASSEMBLYNAME *obj, LPCWSTR assembly, DWORD flags, LPVOID reserved)
 

Variables

static const WCHAR archW [] = {'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e',0}
 
static const WCHAR tokenW [] = {'p','u','b','l','i','c','K','e','y','T','o','k','e','n',0}
 
static const WCHAR typeW [] = {'t','y','p','e',0}
 
static const WCHAR versionW [] = {'v','e','r','s','i','o','n',0}
 
static const IAssemblyNameVtbl name_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 23 of file name.c.

Function Documentation

◆ CreateAssemblyNameObject()

HRESULT WINAPI CreateAssemblyNameObject ( LPASSEMBLYNAME *  obj,
LPCWSTR  assembly,
DWORD  flags,
LPVOID  reserved 
)

Definition at line 366 of file name.c.

371 {
372  struct name *name;
373  HRESULT hr;
374 
375  TRACE("%p, %s, 0x%08x, %p\n", obj, debugstr_w(assembly), flags, reserved);
376 
377  if (!obj) return E_INVALIDARG;
378 
379  *obj = NULL;
381  return E_INVALIDARG;
382 
383  if (!(name = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*name) )))
384  return E_OUTOFMEMORY;
385 
387  name->refs = 1;
388 
390  if (hr != S_OK)
391  {
392  HeapFree( GetProcessHeap(), 0, name->name );
393  HeapFree( GetProcessHeap(), 0, name->arch );
394  HeapFree( GetProcessHeap(), 0, name->token );
395  HeapFree( GetProcessHeap(), 0, name->type );
397  HeapFree( GetProcessHeap(), 0, name );
398  return hr;
399  }
401  return S_OK;
402 }
WCHAR * token
Definition: name.c:42
WCHAR * version
Definition: name.c:44
HRESULT hr
Definition: shlfolder.c:183
IAssemblyName IAssemblyName_iface
Definition: name.c:38
WCHAR * type
Definition: name.c:43
LPCSTR name
Definition: name.c:34
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
r reserved
Definition: btrfs.c:2865
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:77
LONG refs
Definition: name.c:39
WCHAR * arch
Definition: name.c:41
GLbitfield flags
Definition: glext.h:7161
#define S_OK
Definition: intsafe.h:59
static const IAssemblyNameVtbl name_vtbl
Definition: name.c:281
static HRESULT parse_displayname(struct name *name, const WCHAR *displayname)
Definition: name.c:313
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
Definition: name.c:36
#define HeapFree(x, y, z)
Definition: compat.h:402
WCHAR * name
Definition: name.c:40

Referenced by test_CreateAssemblyNameObject().

◆ get_name_attribute()

const WCHAR* get_name_attribute ( IAssemblyName iface,
enum name_attr_id  id 
)

Definition at line 183 of file name.c.

184 {
185  struct name *name = impl_from_IAssemblyName( iface );
186 
187  switch (id)
188  {
189  case NAME_ATTR_ID_NAME: return name->name;
190  case NAME_ATTR_ID_ARCH: return name->arch;
191  case NAME_ATTR_ID_TOKEN: return name->token;
192  case NAME_ATTR_ID_TYPE: return name->type;
193  case NAME_ATTR_ID_VERSION: return name->version;
194  default:
195  ERR("unhandled name attribute %u\n", id);
196  break;
197  }
198  return NULL;
199 }
WCHAR * token
Definition: name.c:42
WCHAR * version
Definition: name.c:44
WCHAR * type
Definition: name.c:43
smooth NULL
Definition: ftsmooth.c:416
static struct name * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: name.c:52
WCHAR * arch
Definition: name.c:41
#define ERR(fmt,...)
Definition: debug.h:109
Definition: name.c:36
WCHAR * name
Definition: name.c:40

Referenced by cache_QueryAssemblyInfo(), cache_UninstallAssembly(), and name_GetName().

◆ impl_from_IAssemblyName()

static struct name* impl_from_IAssemblyName ( IAssemblyName iface)
inlinestatic

Definition at line 52 of file name.c.

53 {
54  return CONTAINING_RECORD( iface, struct name, IAssemblyName_iface );
55 }
IAssemblyName IAssemblyName_iface
Definition: name.c:38
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
Definition: name.c:36

Referenced by get_name_attribute(), name_AddRef(), name_GetDisplayName(), name_GetVersion(), name_QueryInterface(), and name_Release().

◆ name_AddRef()

static ULONG WINAPI name_AddRef ( IAssemblyName iface)
static

Definition at line 79 of file name.c.

81 {
82  struct name *name = impl_from_IAssemblyName( iface );
83  return InterlockedIncrement( &name->refs );
84 }
static struct name * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: name.c:52
LONG refs
Definition: name.c:39
#define InterlockedIncrement
Definition: armddk.h:53
Definition: name.c:36

◆ name_Clone()

static HRESULT WINAPI name_Clone ( IAssemblyName iface,
IAssemblyName **  name 
)
static

Definition at line 273 of file name.c.

276 {
277  FIXME("%p, %p\n", iface, name);
278  return E_NOTIMPL;
279 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: name.c:36

◆ name_Finalize()

static HRESULT WINAPI name_Finalize ( IAssemblyName iface)
static

Definition at line 124 of file name.c.

126 {
127  FIXME("%p\n", iface);
128  return E_NOTIMPL;
129 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ name_GetDisplayName()

static HRESULT WINAPI name_GetDisplayName ( IAssemblyName iface,
LPOLESTR  buffer,
LPDWORD  buflen,
DWORD  flags 
)
static

Definition at line 131 of file name.c.

136 {
137  static const WCHAR fmtW[] = {',','%','s','=','\"','%','s','\"',0};
138  struct name *name = impl_from_IAssemblyName( iface );
139  WCHAR version[30];
140  unsigned int len;
141 
142  TRACE("%p, %p, %p, 0x%08x\n", iface, buffer, buflen, flags);
143 
144  if (!buflen || flags) return E_INVALIDARG;
145 
146  len = strlenW( name->name ) + 1;
147  if (name->arch) len += strlenW( archW ) + strlenW( name->arch ) + 4;
148  if (name->token) len += strlenW( tokenW ) + strlenW( name->token ) + 4;
149  if (name->type) len += strlenW( typeW ) + strlenW( name->type ) + 4;
150  if (name->version) len += strlenW( versionW ) + strlenW( version ) + 4;
151  if (len > *buflen)
152  {
153  *buflen = len;
155  }
156  strcpyW( buffer, name->name );
157  len = strlenW( buffer );
158  if (name->arch) len += sprintfW( buffer + len, fmtW, archW, name->arch );
159  if (name->token) len += sprintfW( buffer + len, fmtW, tokenW, name->token );
160  if (name->type) len += sprintfW( buffer + len, fmtW, typeW, name->type );
161  if (name->version) len += sprintfW( buffer + len, fmtW, versionW, name->version );
162  return S_OK;
163 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
WCHAR * token
Definition: name.c:42
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
WCHAR * version
Definition: name.c:44
static const WCHAR typeW[]
Definition: name.c:49
GLuint buffer
Definition: glext.h:5915
WCHAR * type
Definition: name.c:43
static const WCHAR archW[]
Definition: name.c:47
#define E_INVALIDARG
Definition: ddrawi.h:101
static const WCHAR version[]
Definition: asmname.c:66
static struct name * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: name.c:52
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * arch
Definition: name.c:41
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define sprintfW
Definition: unicode.h:58
Definition: name.c:36
static const WCHAR tokenW[]
Definition: name.c:48
static const WCHAR versionW[]
Definition: name.c:50
WCHAR * name
Definition: name.c:40
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

◆ name_GetName()

static HRESULT WINAPI name_GetName ( IAssemblyName iface,
LPDWORD  buflen,
WCHAR buffer 
)
static

Definition at line 201 of file name.c.

205 {
206  const WCHAR *name;
207  int len;
208 
209  TRACE("%p, %p, %p\n", iface, buflen, buffer);
210 
211  if (!buflen || !buffer) return E_INVALIDARG;
212 
214  len = strlenW( name ) + 1;
215  if (len > *buflen)
216  {
217  *buflen = len;
219  }
220  strcpyW( buffer, name );
221  *buflen = len + 3;
222  return S_OK;
223 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
const WCHAR * get_name_attribute(IAssemblyName *iface, enum name_attr_id id)
Definition: name.c:183
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLuint buffer
Definition: glext.h:5915
LPCSTR name
Definition: name.c:34
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLenum GLsizei len
Definition: glext.h:6722
#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
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

◆ name_GetProperty()

static HRESULT WINAPI name_GetProperty ( IAssemblyName iface,
DWORD  id,
LPVOID  buffer,
LPDWORD  buflen 
)
static

Definition at line 114 of file name.c.

119 {
120  FIXME("%p, %d, %p, %p\n", iface, id, buffer, buflen);
121  return E_NOTIMPL;
122 }
GLuint buffer
Definition: glext.h:5915
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ name_GetVersion()

static HRESULT WINAPI name_GetVersion ( IAssemblyName iface,
LPDWORD  high,
LPDWORD  low 
)
static

Definition at line 246 of file name.c.

250 {
251  struct name *name = impl_from_IAssemblyName( iface );
252  WCHAR *version;
253  HRESULT hr;
254 
255  TRACE("%p, %p, %p\n", iface, high, low);
256 
258  if (!(version = strdupW( name->version ))) return E_OUTOFMEMORY;
259  hr = parse_version( version, high, low );
261  return hr;
262 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
WCHAR * version
Definition: name.c:44
HRESULT hr
Definition: shlfolder.c:183
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const WCHAR version[]
Definition: asmname.c:66
static struct name * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: name.c:52
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static HRESULT parse_version(WCHAR *version, DWORD *high, DWORD *low)
Definition: name.c:225
#define ERROR_NOT_FOUND
Definition: winerror.h:690
Definition: name.c:36
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ name_IsEqual()

static HRESULT WINAPI name_IsEqual ( IAssemblyName name1,
IAssemblyName name2,
DWORD  flags 
)
static

Definition at line 264 of file name.c.

268 {
269  FIXME("%p, %p, 0x%08x\n", name1, name2, flags);
270  return E_NOTIMPL;
271 }
static WCHAR name1[]
Definition: record.c:34
#define FIXME(fmt,...)
Definition: debug.h:110
GLbitfield flags
Definition: glext.h:7161
#define E_NOTIMPL
Definition: ddrawi.h:99
static WCHAR name2[]
Definition: record.c:35

◆ name_QueryInterface()

static HRESULT WINAPI name_QueryInterface ( IAssemblyName iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 57 of file name.c.

61 {
62  struct name *name = impl_from_IAssemblyName( iface );
63 
64  TRACE("%p, %s, %p\n", name, debugstr_guid(riid), obj);
65 
66  *obj = NULL;
67 
68  if (IsEqualIID( riid, &IID_IUnknown ) ||
69  IsEqualIID( riid, &IID_IAssemblyName ))
70  {
71  IAssemblyName_AddRef( iface );
72  *obj = name;
73  return S_OK;
74  }
75 
76  return E_NOINTERFACE;
77 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
LPCSTR name
Definition: name.c:34
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
static struct name * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: name.c:52
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ name_Release()

static ULONG WINAPI name_Release ( IAssemblyName iface)
static

Definition at line 86 of file name.c.

87 {
88  struct name *name = impl_from_IAssemblyName( iface );
90 
91  if (!refs)
92  {
93  TRACE("destroying %p\n", name);
94  HeapFree( GetProcessHeap(), 0, name->name );
95  HeapFree( GetProcessHeap(), 0, name->arch );
97  HeapFree( GetProcessHeap(), 0, name->type );
99  HeapFree( GetProcessHeap(), 0, name );
100  }
101  return refs;
102 }
WCHAR * token
Definition: name.c:42
WCHAR * version
Definition: name.c:44
WCHAR * type
Definition: name.c:43
static struct name * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: name.c:52
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
LONG refs
Definition: name.c:39
WCHAR * arch
Definition: name.c:41
#define InterlockedDecrement
Definition: armddk.h:52
Definition: name.c:36
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:402
WCHAR * name
Definition: name.c:40

◆ name_Reserved()

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

Definition at line 165 of file name.c.

175 {
176  FIXME("%p, %s, %p, %p, %s, %s, %p, %d, %p\n", iface,
177  debugstr_guid(riid), pUnkReserved1, pUnkReserved2,
178  debugstr_w(szReserved), wine_dbgstr_longlong(llReserved),
179  pvReserved, cbReserved, ppReserved);
180  return E_NOTIMPL;
181 }
REFIID riid
Definition: precomp.h:44
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_guid
Definition: kernel32.h:35
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ name_SetProperty()

static HRESULT WINAPI name_SetProperty ( IAssemblyName iface,
DWORD  id,
LPVOID  property,
DWORD  size 
)
static

Definition at line 104 of file name.c.

109 {
110  FIXME("%p, %d, %p, %d\n", iface, id, property, size);
111  return E_NOTIMPL;
112 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLsizeiptr size
Definition: glext.h:5919
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ parse_displayname()

static HRESULT parse_displayname ( struct name name,
const WCHAR displayname 
)
static

Definition at line 313 of file name.c.

314 {
315  const WCHAR *p, *q;
316  unsigned int len;
317 
318  p = q = displayname;
319  while (*q && *q != ',') q++;
320  len = q - p;
321  if (!(name->name = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
322  memcpy( name->name, p, len * sizeof(WCHAR) );
323  name->name[len] = 0;
324  if (!*q) return S_OK;
325 
326  for (;;)
327  {
328  p = ++q;
329  while (*q && *q != '=') q++;
330  if (!*q) return E_INVALIDARG;
331  len = q - p;
332  if (len == ARRAY_SIZE(archW) - 1 && !memcmp( p, archW, len * sizeof(WCHAR) ))
333  {
334  p = ++q;
335  if (!(name->arch = parse_value( p, &len ))) return E_INVALIDARG;
336  q += len;
337  }
338  else if (len == ARRAY_SIZE(tokenW) - 1 && !memcmp( p, tokenW, len * sizeof(WCHAR) ))
339  {
340  p = ++q;
341  if (!(name->token = parse_value( p, &len ))) return E_INVALIDARG;
342  q += len;
343  }
344  else if (len == ARRAY_SIZE(typeW) - 1 && !memcmp( p, typeW, len * sizeof(WCHAR) ))
345  {
346  p = ++q;
347  if (!(name->type = parse_value( p, &len ))) return E_INVALIDARG;
348  q += len;
349  }
350  else if (len == ARRAY_SIZE(versionW) - 1 && !memcmp( p, versionW, len * sizeof(WCHAR) ))
351  {
352  p = ++q;
353  if (!(name->version = parse_value( p, &len ))) return E_INVALIDARG;
354  q += len;
355  }
357  while (*q && *q != ',') q++;
358  if (!*q) break;
359  }
360  return S_OK;
361 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
WCHAR * token
Definition: name.c:42
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
WCHAR * version
Definition: name.c:44
#define ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME
Definition: winerror.h:2221
static const WCHAR typeW[]
Definition: name.c:49
WCHAR * type
Definition: name.c:43
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const WCHAR archW[]
Definition: name.c:47
#define E_INVALIDARG
Definition: ddrawi.h:101
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
static WCHAR * parse_value(const WCHAR *str, unsigned int *len)
Definition: name.c:297
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
WCHAR * arch
Definition: name.c:41
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
Definition: name.c:36
static const WCHAR tokenW[]
Definition: name.c:48
GLfloat GLfloat p
Definition: glext.h:8902
static const WCHAR versionW[]
Definition: name.c:50
WCHAR * name
Definition: name.c:40

Referenced by CreateAssemblyNameObject().

◆ parse_value()

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

Definition at line 297 of file name.c.

298 {
299  WCHAR *ret;
300  const WCHAR *p = str;
301 
302  if (*p++ != '\"') return NULL;
303  while (*p && *p != '\"') p++;
304  if (!*p) return NULL;
305 
306  *len = p - str;
307  if (!(ret = HeapAlloc( GetProcessHeap(), 0, *len * sizeof(WCHAR) ))) return NULL;
308  memcpy( ret, str + 1, (*len - 1) * sizeof(WCHAR) );
309  ret[*len - 1] = 0;
310  return ret;
311 }
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by parse_displayname().

◆ parse_version()

static HRESULT parse_version ( WCHAR version,
DWORD high,
DWORD low 
)
static

Definition at line 225 of file name.c.

226 {
227  WORD ver[4];
228  WCHAR *p, *q;
229  unsigned int i;
230 
231  memset( ver, 0, sizeof(ver) );
232  for (i = 0, p = version; i < 4; i++)
233  {
234  if (!*p) break;
235  q = strchrW( p, '.' );
236  if (q) *q = 0;
237  ver[i] = atolW( p );
238  if (!q && i < 3) break;
239  p = q + 1;
240  }
241  *high = (ver[0] << 16) + ver[1];
242  *low = (ver[2] << 16) + ver[3];
243  return S_OK;
244 }
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
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:66
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
Definition: unicode.h:310
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned short WORD
Definition: ntddk_ex.h:93
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
#define S_OK
Definition: intsafe.h:59
GLfloat GLfloat p
Definition: glext.h:8902
#define memset(x, y, z)
Definition: compat.h:39

Referenced by name_GetVersion().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( sxs  )

Variable Documentation

◆ archW

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

Definition at line 47 of file name.c.

Referenced by build_assembly_id(), name_GetDisplayName(), and parse_displayname().

◆ name_vtbl

const IAssemblyNameVtbl name_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI name_Finalize(IAssemblyName *iface)
Definition: name.c:124
static HRESULT WINAPI name_QueryInterface(IAssemblyName *iface, REFIID riid, void **obj)
Definition: name.c:57
static HRESULT WINAPI name_Reserved(IAssemblyName *iface, REFIID riid, IUnknown *pUnkReserved1, IUnknown *pUnkReserved2, LPCOLESTR szReserved, LONGLONG llReserved, LPVOID pvReserved, DWORD cbReserved, LPVOID *ppReserved)
Definition: name.c:165
static ULONG WINAPI name_Release(IAssemblyName *iface)
Definition: name.c:86
static HRESULT WINAPI name_GetProperty(IAssemblyName *iface, DWORD id, LPVOID buffer, LPDWORD buflen)
Definition: name.c:114
static ULONG WINAPI name_AddRef(IAssemblyName *iface)
Definition: name.c:79
static HRESULT WINAPI name_GetName(IAssemblyName *iface, LPDWORD buflen, WCHAR *buffer)
Definition: name.c:201
static HRESULT WINAPI name_Clone(IAssemblyName *iface, IAssemblyName **name)
Definition: name.c:273
static HRESULT WINAPI name_SetProperty(IAssemblyName *iface, DWORD id, LPVOID property, DWORD size)
Definition: name.c:104
static HRESULT WINAPI name_IsEqual(IAssemblyName *name1, IAssemblyName *name2, DWORD flags)
Definition: name.c:264
static HRESULT WINAPI name_GetVersion(IAssemblyName *iface, LPDWORD high, LPDWORD low)
Definition: name.c:246
static HRESULT WINAPI name_GetDisplayName(IAssemblyName *iface, LPOLESTR buffer, LPDWORD buflen, DWORD flags)
Definition: name.c:131

Definition at line 281 of file name.c.

Referenced by CreateAssemblyNameObject().

◆ tokenW

const WCHAR tokenW[] = {'p','u','b','l','i','c','K','e','y','T','o','k','e','n',0}
static

Definition at line 48 of file name.c.

Referenced by name_GetDisplayName(), parse_assembly(), and parse_displayname().

◆ typeW

◆ versionW