ReactOS 0.4.17-dev-970-gcf0f1a6
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#ifdef __REACTOS__
27#define WIN32_NO_STATUS
28#endif
29
30#include "windef.h"
31#include "winbase.h"
32#include "winuser.h"
33#include "ole2.h"
34#include "guiddef.h"
35#include "fusion.h"
36#include "corerror.h"
37#include "strsafe.h"
38
39#include "wine/debug.h"
40#include "fusionpriv.h"
41
43
44typedef struct {
46
48
53
56
59
61
64
65static const WCHAR separator[] = {',',' ',0};
66static const WCHAR version[] = {'V','e','r','s','i','o','n',0};
67static const WCHAR culture[] = {'C','u','l','t','u','r','e',0};
68static const WCHAR pubkey[] =
69 {'P','u','b','l','i','c','K','e','y','T','o','k','e','n',0};
70static const WCHAR procarch[] = {'p','r','o','c','e','s','s','o','r',
71 'A','r','c','h','i','t','e','c','t','u','r','e',0};
72
73#define CHARS_PER_PUBKEY 16
74
76{
77 return CONTAINING_RECORD(iface, IAssemblyNameImpl, IAssemblyName_iface);
78}
79
81 REFIID riid, LPVOID *ppobj)
82{
84
85 TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
86
87 *ppobj = NULL;
88
90 IsEqualIID(riid, &IID_IAssemblyName))
91 {
92 IAssemblyName_AddRef(iface);
93 *ppobj = &This->IAssemblyName_iface;
94 return S_OK;
95 }
96
97 WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
98 return E_NOINTERFACE;
99}
100
102{
104 ULONG refCount = InterlockedIncrement(&This->ref);
105
106 TRACE("(%p)->(ref before = %lu)\n", This, refCount - 1);
107
108 return refCount;
109}
110
112{
114 ULONG refCount = InterlockedDecrement(&This->ref);
115
116 TRACE("(%p)->(ref before = %lu)\n", This, refCount + 1);
117
118 if (!refCount)
119 {
120 free(This->path);
121 free(This->displayname);
122 free(This->name);
123 free(This->culture);
124 free(This->procarch);
125 free(This);
126 }
127
128 return refCount;
129}
130
133 LPVOID pvProperty,
134 DWORD cbProperty)
135{
136 FIXME("(%p, %ld, %p, %ld) stub!\n", iface, PropertyId, pvProperty, cbProperty);
137 return E_NOTIMPL;
138}
139
142 LPVOID pvProperty,
143 LPDWORD pcbProperty)
144{
146 DWORD size;
147
148 TRACE("(%p, %ld, %p, %p)\n", iface, PropertyId, pvProperty, pcbProperty);
149
150 size = *pcbProperty;
151 switch (PropertyId)
152 {
153 case ASM_NAME_NULL_PUBLIC_KEY:
154 case ASM_NAME_NULL_PUBLIC_KEY_TOKEN:
155 if (name->haspubkey)
156 return S_OK;
157 return S_FALSE;
158
159 case ASM_NAME_NULL_CUSTOM:
160 return S_OK;
161
162 case ASM_NAME_NAME:
163 *pcbProperty = 0;
164 if (name->name)
165 {
166 *pcbProperty = (lstrlenW(name->name) + 1) * 2;
167 if (size < *pcbProperty)
169 lstrcpyW(pvProperty, name->name);
170 }
171 break;
172
173 case ASM_NAME_MAJOR_VERSION:
174 *pcbProperty = 0;
175 if (name->versize >= 1)
176 {
177 *pcbProperty = sizeof(WORD);
178 if (size < *pcbProperty)
180 *((WORD *)pvProperty) = name->version[0];
181 }
182 break;
183
184 case ASM_NAME_MINOR_VERSION:
185 *pcbProperty = 0;
186 if (name->versize >= 2)
187 {
188 *pcbProperty = sizeof(WORD);
189 if (size < *pcbProperty)
191 *((WORD *)pvProperty) = name->version[1];
192 }
193 break;
194
195 case ASM_NAME_BUILD_NUMBER:
196 *pcbProperty = 0;
197 if (name->versize >= 3)
198 {
199 *pcbProperty = sizeof(WORD);
200 if (size < *pcbProperty)
202 *((WORD *)pvProperty) = name->version[2];
203 }
204 break;
205
206 case ASM_NAME_REVISION_NUMBER:
207 *pcbProperty = 0;
208 if (name->versize >= 4)
209 {
210 *pcbProperty = sizeof(WORD);
211 if (size < *pcbProperty)
213 *((WORD *)pvProperty) = name->version[3];
214 }
215 break;
216
217 case ASM_NAME_CULTURE:
218 *pcbProperty = 0;
219 if (name->culture)
220 {
221 *pcbProperty = (lstrlenW(name->culture) + 1) * 2;
222 if (size < *pcbProperty)
224 lstrcpyW(pvProperty, name->culture);
225 }
226 break;
227
228 case ASM_NAME_PUBLIC_KEY_TOKEN:
229 *pcbProperty = 0;
230 if (name->haspubkey)
231 {
232 *pcbProperty = sizeof(DWORD) * 2;
233 if (size < *pcbProperty)
235 memcpy(pvProperty, name->pubkey, sizeof(DWORD) * 2);
236 }
237 break;
238
239 case ASM_NAME_ARCHITECTURE:
240 *pcbProperty = 0;
241 if (name->pekind != peNone)
242 {
243 *pcbProperty = sizeof(PEKIND);
244 if (size < *pcbProperty)
246 *((PEKIND *)pvProperty) = name->pekind;
247 }
248 break;
249
250 default:
251 *pcbProperty = 0;
252 break;
253 }
254
255 return S_OK;
256}
257
259{
260 FIXME("(%p) stub!\n", iface);
261 return E_NOTIMPL;
262}
263
265 LPOLESTR szDisplayName,
266 LPDWORD pccDisplayName,
267 DWORD dwDisplayFlags)
268{
269 static const WCHAR equals[] = {'=',0};
271 WCHAR verstr[30], *cultureval = NULL;
272 DWORD size;
273
274 TRACE("(%p, %p, %p, %ld)\n", iface, szDisplayName,
275 pccDisplayName, dwDisplayFlags);
276
277 if (dwDisplayFlags == 0)
278 {
279 if (!name->displayname || !*name->displayname)
281
282 size = lstrlenW(name->displayname) + 1;
283
284 if (*pccDisplayName < size)
285 {
286 *pccDisplayName = size;
288 }
289
290 if (szDisplayName) lstrcpyW(szDisplayName, name->displayname);
291 *pccDisplayName = size;
292
293 return S_OK;
294 }
295
296 if (!name->name || !*name->name)
298
299 /* Verify buffer size is sufficient */
300 size = lstrlenW(name->name) + 1;
301
302 if ((dwDisplayFlags & ASM_DISPLAYF_VERSION) && (name->versize > 0))
303 {
304 static const WCHAR spec[] = {'%','d',0};
305 static const WCHAR period[] = {'.',0};
306 DWORD i;
307
308 wsprintfW(verstr, spec, name->version[0]);
309
310 for (i = 1; i < name->versize; i++)
311 {
312 WCHAR value[6];
313 wsprintfW(value, spec, name->version[i]);
314
315 lstrcatW(verstr, period);
316 lstrcatW(verstr, value);
317 }
318
319 size += lstrlenW(separator) + lstrlenW(version) + lstrlenW(equals) + lstrlenW(verstr);
320 }
321
322 if ((dwDisplayFlags & ASM_DISPLAYF_CULTURE) && (name->culture))
323 {
324 static const WCHAR neutral[] = {'n','e','u','t','r','a','l', 0};
325
326 cultureval = (lstrlenW(name->culture) == 2) ? name->culture : (LPWSTR) neutral;
327 size += lstrlenW(separator) + lstrlenW(culture) + lstrlenW(equals) + lstrlenW(cultureval);
328 }
329
330 if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
332
333 if ((dwDisplayFlags & ASM_DISPLAYF_PROCESSORARCHITECTURE) && (name->procarch))
334 size += lstrlenW(separator) + lstrlenW(procarch) + lstrlenW(equals) + lstrlenW(name->procarch);
335
336 if (size > *pccDisplayName)
337 {
338 *pccDisplayName = size;
340 }
341
342 /* Construct the string */
343 lstrcpyW(szDisplayName, name->name);
344
345 if ((dwDisplayFlags & ASM_DISPLAYF_VERSION) && (name->versize > 0))
346 {
347 lstrcatW(szDisplayName, separator);
348
349 lstrcatW(szDisplayName, version);
350 lstrcatW(szDisplayName, equals);
351 lstrcatW(szDisplayName, verstr);
352 }
353
354 if ((dwDisplayFlags & ASM_DISPLAYF_CULTURE) && (name->culture))
355 {
356 lstrcatW(szDisplayName, separator);
357
358 lstrcatW(szDisplayName, culture);
359 lstrcatW(szDisplayName, equals);
360 lstrcatW(szDisplayName, cultureval);
361 }
362
363 if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
364 {
365 WCHAR pkt[CHARS_PER_PUBKEY + 1];
366 static const WCHAR spec[] = {'%','0','2','x','%','0','2','x','%','0','2','x',
367 '%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',0};
368
369 lstrcatW(szDisplayName, separator);
370
371 lstrcatW(szDisplayName, pubkey);
372 lstrcatW(szDisplayName, equals);
373
374 wsprintfW(pkt, spec, name->pubkey[0], name->pubkey[1], name->pubkey[2],
375 name->pubkey[3], name->pubkey[4], name->pubkey[5], name->pubkey[6],
376 name->pubkey[7]);
377
378 lstrcatW(szDisplayName, pkt);
379 }
380
381 if ((dwDisplayFlags & ASM_DISPLAYF_PROCESSORARCHITECTURE) && (name->procarch))
382 {
383 lstrcatW(szDisplayName, separator);
384
385 lstrcatW(szDisplayName, procarch);
386 lstrcatW(szDisplayName, equals);
387 lstrcatW(szDisplayName, name->procarch);
388 }
389
390 *pccDisplayName = size;
391 return S_OK;
392}
393
395 REFIID refIID,
396 IUnknown *pUnkReserved1,
397 IUnknown *pUnkReserved2,
398 LPCOLESTR szReserved,
399 LONGLONG llReserved,
401 DWORD cbReserved,
402 LPVOID *ppReserved)
403{
404 TRACE("(%p, %s, %p, %p, %s, %s, %p, %ld, %p)\n", iface,
405 debugstr_guid(refIID), pUnkReserved1, pUnkReserved2,
406 debugstr_w(szReserved), wine_dbgstr_longlong(llReserved),
407 pvReserved, cbReserved, ppReserved);
408
409 return E_NOTIMPL;
410}
411
413 LPDWORD lpcwBuffer,
414 WCHAR *pwzName)
415{
417 DWORD len;
418
419 TRACE("(%p, %p, %p)\n", iface, lpcwBuffer, pwzName);
420
421 if (name->name)
422 len = lstrlenW(name->name) + 1;
423 else
424 len = 0;
425
426 if (*lpcwBuffer < len)
427 {
428 *lpcwBuffer = len;
430 }
431 if (!name->name) lpcwBuffer[0] = 0;
432 else lstrcpyW(pwzName, name->name);
433
434 *lpcwBuffer = len;
435 return S_OK;
436}
437
439 LPDWORD pdwVersionHi,
440 LPDWORD pdwVersionLow)
441{
443
444 TRACE("(%p, %p, %p)\n", iface, pdwVersionHi, pdwVersionLow);
445
446 *pdwVersionHi = 0;
447 *pdwVersionLow = 0;
448
449 if (name->versize != 4)
451
452 *pdwVersionHi = (name->version[0] << 16) + name->version[1];
453 *pdwVersionLow = (name->version[2] << 16) + name->version[3];
454
455 return S_OK;
456}
457
460 DWORD flags)
461{
464
465 TRACE("(%p, %p, 0x%08lx)\n", iface, pName, flags);
466
467 if (!pName) return S_FALSE;
468 if (flags & ~ASM_CMPF_IL_ALL) FIXME("unsupported flags\n");
469
470 if ((flags & ASM_CMPF_NAME) && lstrcmpW(name1->name, name2->name)) return S_FALSE;
471 if (name1->versize && name2->versize)
472 {
473 if ((flags & ASM_CMPF_MAJOR_VERSION) &&
474 name1->version[0] != name2->version[0]) return S_FALSE;
475 if ((flags & ASM_CMPF_MINOR_VERSION) &&
476 name1->version[1] != name2->version[1]) return S_FALSE;
477 if ((flags & ASM_CMPF_BUILD_NUMBER) &&
478 name1->version[2] != name2->version[2]) return S_FALSE;
479 if ((flags & ASM_CMPF_REVISION_NUMBER) &&
480 name1->version[3] != name2->version[3]) return S_FALSE;
481 }
482 if ((flags & ASM_CMPF_PUBLIC_KEY_TOKEN) &&
483 name1->haspubkey && name2->haspubkey &&
484 memcmp(name1->pubkey, name2->pubkey, sizeof(name1->pubkey))) return S_FALSE;
485
486 if ((flags & ASM_CMPF_CULTURE) &&
487 name1->culture && name2->culture &&
488 lstrcmpW(name1->culture, name2->culture)) return S_FALSE;
489
490 return S_OK;
491}
492
495{
496 FIXME("(%p, %p) stub!\n", iface, pName);
497 return E_NOTIMPL;
498}
499
500static const IAssemblyNameVtbl AssemblyNameVtbl = {
513};
514
515/* Internal methods */
517{
518 assert(iface->lpVtbl == &AssemblyNameVtbl);
519
520 return impl_from_IAssemblyName(iface);
521}
522
524{
526
527 name->path = wcsdup(path);
528 if (!name->path)
529 return E_OUTOFMEMORY;
530
531 return S_OK;
532}
533
535{
538
539 if (!name->path)
540 return S_OK;
541
542 if (!buf)
543 buffer_size = 0;
544
545 *len = lstrlenW(name->path) + 1;
546
547 if (*len <= buffer_size)
548 lstrcpyW(buf, name->path);
549 else
551
552 return S_OK;
553}
554
556{
557 LPWSTR beg, end;
558 int i;
559
560 for (i = 0, beg = version; i < 4; i++)
561 {
562 if (!*beg)
563 return S_OK;
564
565 end = wcschr(beg, '.');
566
567 if (end) *end = '\0';
568 name->version[i] = wcstol(beg, NULL, 10);
569 name->versize++;
570
571 if (!end && i < 3)
572 return S_OK;
573
574 beg = end + 1;
575 }
576
577 return S_OK;
578}
579
581{
582 if (lstrlenW(culture) == 2)
583 name->culture = wcsdup(culture);
584 else
585 name->culture = wcsdup(L"");
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
619
620 for (i = 0; i < CHARS_PER_PUBKEY; i++)
621 if (!is_hex(pubkey[i]))
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));
654 }
655
656 return S_OK;
657}
658
659static 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 = malloc( (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 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 = wcsdup(szAssemblyName);
692 if (!name->displayname)
693 return E_OUTOFMEMORY;
694
696 save = str;
697 if (!str)
698 {
700 goto done;
701 }
702
703 ptr = wcschr(str, ',');
704 if (ptr) *ptr = '\0';
705
706 /* no ',' but ' ' only */
707 if( !ptr && wcschr(str, ' ') )
708 {
710 goto done;
711 }
712
713 name->name = wcsdup(str);
714 if (!name->name)
715 {
717 goto done;
718 }
719
720 if (!ptr)
721 goto done;
722
723 str = ptr + 1;
724 while (!done)
725 {
726 ptr = wcschr(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 = wcschr(ptr, ',')))
741 {
742 if (!(ptr2 = wcschr(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))
761 else if (!lstrcmpiW(str, culture))
763 else if (!lstrcmpiW(str, pubkey))
765 else if (!lstrcmpiW(str, procarch))
766 {
767 name->procarch = value;
768 value = NULL;
769
770 hr = parse_procarch( name, name->procarch );
771 }
772 free( value );
773
774 if (FAILED(hr))
775 goto done;
776
777 str = ptr2 + 1;
778 }
779
780done:
781 free(save);
782 if (FAILED(hr))
783 {
784 free(name->displayname);
785 free(name->name);
786 free(name->culture);
787 free(name->procarch);
788 }
789 return hr;
790}
791
792/******************************************************************
793 * CreateAssemblyNameObject (FUSION.@)
794 */
798{
800 HRESULT hr;
801
802 TRACE("(%p, %s, %08lx, %p)\n", ppAssemblyNameObj,
804
805 if (!ppAssemblyNameObj)
806 return E_INVALIDARG;
807
810 return E_INVALIDARG;
811
812 if (!(name = calloc(1, sizeof(*name)))) return E_OUTOFMEMORY;
813
815 name->ref = 1;
816
818 if (FAILED(hr))
819 {
820 free(name);
821 return hr;
822 }
823
824 *ppAssemblyNameObj = &name->IAssemblyName_iface;
825
826 return S_OK;
827}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: cdrom.h:932
#define FUSION_E_PRIVATE_ASM_DISALLOWED
Definition: corerror.h:172
#define FUSION_E_INVALID_NAME
Definition: corerror.h:175
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define wcschr
Definition: compat.h:17
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface)
Definition: asmname.c:111
static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface, LPDWORD pdwVersionHi, LPDWORD pdwVersionLow)
Definition: asmname.c:438
static HRESULT WINAPI IAssemblyNameImpl_Clone(IAssemblyName *iface, IAssemblyName **pName)
Definition: asmname.c:493
static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey)
Definition: asmname.c:608
static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, LPDWORD pcbProperty)
Definition: asmname.c:140
static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version)
Definition: asmname.c:555
static const WCHAR version[]
Definition: asmname.c:66
static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
Definition: asmname.c:101
static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface, IAssemblyName *pName, DWORD flags)
Definition: asmname.c:458
HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path)
Definition: asmname.c:523
static const WCHAR procarch[]
Definition: asmname.c:70
#define CHARS_PER_PUBKEY
Definition: asmname.c:73
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:394
static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface, REFIID riid, LPVOID *ppobj)
Definition: asmname.c:80
static const WCHAR separator[]
Definition: asmname.c:65
static HRESULT WINAPI IAssemblyNameImpl_Finalize(IAssemblyName *iface)
Definition: asmname.c:258
static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface, LPDWORD lpcwBuffer, WCHAR *pwzName)
Definition: asmname.c:412
static WCHAR * parse_value(const WCHAR *str, unsigned int len)
Definition: asmname.c:659
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
Definition: asmname.c:795
static BYTE hextobyte(WCHAR c)
Definition: asmname.c:597
static HRESULT parse_procarch(IAssemblyNameImpl *name, LPCWSTR procarch)
Definition: asmname.c:635
HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len)
Definition: asmname.c:534
static const WCHAR pubkey[]
Definition: asmname.c:68
static IAssemblyNameImpl * unsafe_impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:516
static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface, LPOLESTR szDisplayName, LPDWORD pccDisplayName, DWORD dwDisplayFlags)
Definition: asmname.c:264
static IAssemblyNameImpl * impl_from_IAssemblyName(IAssemblyName *iface)
Definition: asmname.c:75
static const IAssemblyNameVtbl AssemblyNameVtbl
Definition: asmname.c:500
static HRESULT parse_culture(IAssemblyNameImpl *name, LPCWSTR culture)
Definition: asmname.c:580
static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyName)
Definition: asmname.c:682
static const WCHAR culture[]
Definition: asmname.c:67
static HRESULT WINAPI IAssemblyNameImpl_SetProperty(IAssemblyName *iface, DWORD PropertyId, LPVOID pvProperty, DWORD cbProperty)
Definition: asmname.c:131
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4171
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
#define is_hex(c)
Definition: registry.c:430
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
PEKIND
Definition: fusion.idl:36
@ peMSIL
Definition: fusion.idl:38
@ peIA64
Definition: fusion.idl:40
@ peI386
Definition: fusion.idl:39
@ peNone
Definition: fusion.idl:37
@ peAMD64
Definition: fusion.idl:41
GLuint GLuint end
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
const GLubyte * c
Definition: glext.h:8905
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define wine_dbgstr_w
Definition: kernel32.h:34
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
static LPSTR pName
Definition: security.c:86
static WCHAR name1[]
Definition: record.c:34
static WCHAR name2[]
Definition: record.c:35
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749
static LPCWSTR szAssemblyName
Definition: asmenum.c:37
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define DWORD
Definition: nt_native.h:44
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define calloc
Definition: rosglue.h:14
const WCHAR * str
#define TRACE(s)
Definition: solgame.cpp:4
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95
#define STRSAFE_E_INSUFFICIENT_BUFFER
Definition: strsafe.h:103
LPWSTR culture
Definition: asmname.c:51
LPWSTR displayname
Definition: asmname.c:49
IAssemblyName IAssemblyName_iface
Definition: asmname.c:45
PEKIND pekind
Definition: asmname.c:60
LPWSTR procarch
Definition: asmname.c:52
Definition: name.c:39
WCHAR * name
Definition: name.c:42
WCHAR * version
Definition: name.c:46
IAssemblyName IAssemblyName_iface
Definition: name.c:40
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56
int64_t LONGLONG
Definition: typedefs.h:68
uint32_t * LPDWORD
Definition: typedefs.h:59
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:64
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:3437
#define E_NOINTERFACE
Definition: winerror.h:3479
@ CANOF_PARSE_DISPLAY_NAME
Definition: winsxs.idl:193
unsigned char BYTE
Definition: xxhash.c:193