ReactOS  0.4.14-dev-52-g6116262
asmname.c
Go to the documentation of this file.
1 /*
2  * IAssemblyName implementation
3  *
4  * Copyright 2008 James Hawkins
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #include <stdarg.h>
22 #include <assert.h>
23 
24 #define COBJMACROS
25 #define INITGUID
26 
27 #include "windef.h"
28 #include "winbase.h"
29 #include "winuser.h"
30 #include "ole2.h"
31 #include "guiddef.h"
32 #include "fusion.h"
33 #include "corerror.h"
34 #include "strsafe.h"
35 
36 #include "wine/debug.h"
37 #include "wine/unicode.h"
38 #include "fusionpriv.h"
39 
41 
42 typedef struct {
44 
46 
51 
54 
57 
59 
62 
63 static const WCHAR separator[] = {',',' ',0};
64 static const WCHAR version[] = {'V','e','r','s','i','o','n',0};
65 static const WCHAR culture[] = {'C','u','l','t','u','r','e',0};
66 static const WCHAR pubkey[] =
67  {'P','u','b','l','i','c','K','e','y','T','o','k','e','n',0};
68 static const WCHAR procarch[] = {'p','r','o','c','e','s','s','o','r',
69  'A','r','c','h','i','t','e','c','t','u','r','e',0};
70 
71 #define CHARS_PER_PUBKEY 16
72 
74 {
75  return CONTAINING_RECORD(iface, IAssemblyNameImpl, IAssemblyName_iface);
76 }
77 
79  REFIID riid, LPVOID *ppobj)
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 }
98 
100 {
102  ULONG refCount = InterlockedIncrement(&This->ref);
103 
104  TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
105 
106  return refCount;
107 }
108 
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 }
128 
131  LPVOID pvProperty,
132  DWORD cbProperty)
133 {
134  FIXME("(%p, %d, %p, %d) stub!\n", iface, PropertyId, pvProperty, cbProperty);
135  return E_NOTIMPL;
136 }
137 
140  LPVOID pvProperty,
141  LPDWORD pcbProperty)
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 }
255 
257 {
258  FIXME("(%p) stub!\n", iface);
259  return E_NOTIMPL;
260 }
261 
263  LPOLESTR szDisplayName,
264  LPDWORD pccDisplayName,
265  DWORD dwDisplayFlags)
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 }
391 
393  REFIID refIID,
394  IUnknown *pUnkReserved1,
395  IUnknown *pUnkReserved2,
396  LPCOLESTR szReserved,
397  LONGLONG llReserved,
399  DWORD cbReserved,
400  LPVOID *ppReserved)
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 }
409 
411  LPDWORD lpcwBuffer,
412  WCHAR *pwzName)
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 }
435 
437  LPDWORD pdwVersionHi,
438  LPDWORD pdwVersionLow)
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 }
455 
458  DWORD flags)
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 }
490 
493 {
494  FIXME("(%p, %p) stub!\n", iface, pName);
495  return E_NOTIMPL;
496 }
497 
498 static const IAssemblyNameVtbl AssemblyNameVtbl = {
511 };
512 
513 /* Internal methods */
515 {
516  assert(iface->lpVtbl == &AssemblyNameVtbl);
517 
518  return impl_from_IAssemblyName(iface);
519 }
520 
522 {
524 
525  name->path = strdupW(path);
526  if (!name->path)
527  return E_OUTOFMEMORY;
528 
529  return S_OK;
530 }
531 
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 }
552 
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 }
577 
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 }
589 
591 {
592  return ((c >= 'a' && c <= 'f') ||
593  (c >= 'A' && c <= 'F') ||
594  (c >= '0' && c <= '9'));
595 }
596 
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 }
607 
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 }
634 
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 }
658 
659 static WCHAR *parse_value( const WCHAR *str, unsigned int len )
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 }
681 
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 }
791 
792 /******************************************************************
793  * CreateAssemblyNameObject (FUSION.@)
794  */
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 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, LPDWORD pcbProperty)
Definition: asmname.c:138
static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
Definition: asmname.c:553
LPWSTR procarch
Definition: asmname.c:50
LPWSTR displayname
Definition: asmname.c:47
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
#define E_NOINTERFACE
Definition: winerror.h:2364
static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface, LPDWORD lpcwBuffer, WCHAR *pwzName)
Definition: asmname.c:410
static const WCHAR separator[]
Definition: asmname.c:63
static WCHAR * parse_value(const WCHAR *str, unsigned int len)
Definition: asmname.c:659
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
WCHAR * version
Definition: name.c:44
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static HRESULT WINAPI IAssemblyNameImpl_Finalize(IAssemblyName *iface)
Definition: asmname.c:256
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: classpnp.h:966
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
static const WCHAR pubkey[]
Definition: asmname.c:66
REFIID riid
Definition: precomp.h:44
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
static const WCHAR empty[]
Definition: main.c:49
#define FUSION_E_PRIVATE_ASM_DISALLOWED
Definition: corerror.h:122
#define WARN(fmt,...)
Definition: debug.h:111
#define CHARS_PER_PUBKEY
Definition: asmname.c:71
#define assert(x)
Definition: debug.h:53
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 LPCWSTR szAssemblyName
Definition: asmname.c:40
IAssemblyName IAssemblyName_iface
Definition: name.c:38
static HRESULT WINAPI IAssemblyNameImpl_Clone(IAssemblyName *iface, IAssemblyName **pName)
Definition: asmname.c:491
GLuint GLuint end
Definition: gl.h:1545
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:73
static WCHAR name1[]
Definition: record.c:34
static LPOLESTR
Definition: stg_prop.c:27
#define lstrlenW
Definition: compat.h:407
#define STRSAFE_E_INSUFFICIENT_BUFFER
Definition: strsafe.h:103
#define DWORD
Definition: nt_native.h:44
static const WCHAR procarch[]
Definition: asmname.c:68
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static IAssemblyNameImpl * unsafe_impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:514
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 LPCWSTR DWORD LPVOID pvReserved
Definition: asmname.c:40
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface, IAssemblyName *pName, DWORD flags)
Definition: asmname.c:456
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static PVOID ptr
Definition: dispmode.c:27
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:927
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
LPWSTR culture
Definition: asmname.c:49
WINE_UNICODE_INLINE long int atolW(const WCHAR *str)
Definition: unicode.h:310
static HRESULT parse_procarch(IAssemblyNameImpl *name, LPCWSTR procarch)
Definition: asmname.c:635
#define debugstr_guid
Definition: kernel32.h:35
static const IAssemblyNameVtbl AssemblyNameVtbl
Definition: asmname.c:498
static BOOL is_hex(WCHAR c)
Definition: asmname.c:590
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
GLuint GLfloat * val
Definition: glext.h:7180
static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyName)
Definition: asmname.c:682
static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
Definition: asmname.c:99
int64_t LONGLONG
Definition: typedefs.h:66
WINE_DEFAULT_DEBUG_CHANNEL(fusion)
#define TRACE(s)
Definition: solgame.cpp:4
static LPSTR pName
Definition: security.c:75
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define WINAPI
Definition: msvc.h:8
#define FUSION_E_INVALID_NAME
Definition: corerror.h:123
const GLubyte * c
Definition: glext.h:8905
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
Definition: asmname.c:795
GLbitfield flags
Definition: glext.h:7161
int ret
PEKIND
Definition: fusion.idl:35
#define InterlockedDecrement
Definition: armddk.h:52
static HRESULT parse_culture(IAssemblyNameImpl *name, LPCWSTR culture)
Definition: asmname.c:578
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
unsigned char BYTE
Definition: mem.h:68
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
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:2345
GLsizei const GLfloat * value
Definition: glext.h:6069
#define ERR(fmt,...)
Definition: debug.h:109
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
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path)
Definition: asmname.c:521
#define InterlockedIncrement
Definition: armddk.h:53
#define lstrcpyW
Definition: compat.h:406
PEKIND pekind
Definition: asmname.c:58
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: services.c:325
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len)
Definition: asmname.c:532
Definition: name.c:36
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
uint32_t * LPDWORD
Definition: typedefs.h:57
unsigned int ULONG
Definition: retypes.h:1
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
static WCHAR name2[]
Definition: record.c:35
static const WCHAR culture[]
Definition: asmname.c:65
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
IAssemblyName IAssemblyName_iface
Definition: asmname.c:43
static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface)
Definition: asmname.c:109
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey)
Definition: asmname.c:608
static BYTE hextobyte(WCHAR c)
Definition: asmname.c:597
WCHAR * name
Definition: name.c:40
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
GLuint const GLchar * name
Definition: glext.h:6031