ReactOS  0.4.13-dev-79-gcd489d8
asmenum.c
Go to the documentation of this file.
1 /*
2  * IAssemblyEnum 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 
23 #define COBJMACROS
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
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 "fusionpriv.h"
35 
36 #include "wine/debug.h"
37 #include "wine/unicode.h"
38 #include "wine/list.h"
39 
41 
42 typedef struct _tagASMNAME
43 {
44  struct list entry;
46 } ASMNAME;
47 
48 typedef struct
49 {
51 
52  struct list assemblies;
53  struct list *iter;
56 
58 {
59  return CONTAINING_RECORD(iface, IAssemblyEnumImpl, IAssemblyEnum_iface);
60 }
61 
63  REFIID riid, LPVOID *ppobj)
64 {
66 
67  TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
68 
69  *ppobj = NULL;
70 
71  if (IsEqualIID(riid, &IID_IUnknown) ||
72  IsEqualIID(riid, &IID_IAssemblyEnum))
73  {
74  IAssemblyEnum_AddRef(iface);
75  *ppobj = &This->IAssemblyEnum_iface;
76  return S_OK;
77  }
78 
79  WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
80  return E_NOINTERFACE;
81 }
82 
84 {
86  ULONG refCount = InterlockedIncrement(&This->ref);
87 
88  TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
89 
90  return refCount;
91 }
92 
94 {
96  ULONG refCount = InterlockedDecrement(&This->ref);
97  struct list *item, *cursor;
98 
99  TRACE("(%p)->(ref before = %u)\n", This, refCount + 1);
100 
101  if (!refCount)
102  {
103  LIST_FOR_EACH_SAFE(item, cursor, &This->assemblies)
104  {
105  ASMNAME *asmname = LIST_ENTRY(item, ASMNAME, entry);
106 
107  list_remove(&asmname->entry);
108  IAssemblyName_Release(asmname->name);
109  heap_free(asmname);
110  }
111 
112  heap_free(This);
113  }
114 
115  return refCount;
116 }
117 
120  IAssemblyName **ppName,
121  DWORD dwFlags)
122 {
123  IAssemblyEnumImpl *asmenum = impl_from_IAssemblyEnum(iface);
124  ASMNAME *asmname;
125 
126  TRACE("(%p, %p, %p, %d)\n", iface, pvReserved, ppName, dwFlags);
127 
128  if (!ppName)
129  return E_INVALIDARG;
130 
131  asmname = LIST_ENTRY(asmenum->iter, ASMNAME, entry);
132  if (!asmname)
133  return S_FALSE;
134 
135  *ppName = asmname->name;
136  IAssemblyName_AddRef(*ppName);
137 
138  asmenum->iter = list_next(&asmenum->assemblies, asmenum->iter);
139 
140  return S_OK;
141 }
142 
144 {
145  IAssemblyEnumImpl *asmenum = impl_from_IAssemblyEnum(iface);
146 
147  TRACE("(%p)\n", iface);
148 
149  asmenum->iter = list_head(&asmenum->assemblies);
150  return S_OK;
151 }
152 
154  IAssemblyEnum **ppEnum)
155 {
156  FIXME("(%p, %p) stub!\n", iface, ppEnum);
157  return E_NOTIMPL;
158 }
159 
160 static const IAssemblyEnumVtbl AssemblyEnumVtbl = {
167 };
168 
169 static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path,
170  const WCHAR *prefix, WCHAR *buf)
171 {
172  static const WCHAR star[] = {'*',0};
173  static const WCHAR ss_fmt[] = {'%','s','\\','%','s',0};
174  static const WCHAR sss_fmt[] = {'%','s','\\','%','s','_','_','%','s',0};
175  static const WCHAR ssss_fmt[] = {'%','s','\\','%','s','%','s','_','_','%','s',0};
176  static const WCHAR ver_fmt[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
177  static const WCHAR star_fmt[] = {'%','s','\\','*',0};
178  static const WCHAR star_prefix_fmt[] = {'%','s','\\','%','s','*',0};
179  WCHAR disp[MAX_PATH], version[24]; /* strlen("65535") * 4 + 3 + 1 */
180  LPCWSTR verptr, pubkeyptr;
181  HRESULT hr;
182  DWORD size, major_size, minor_size, build_size, revision_size;
183  WORD major, minor, build, revision;
184  WCHAR token_str[TOKEN_LENGTH + 1];
186 
187  if (!name)
188  {
189  if (prefix && depth == 1)
190  sprintfW(buf, star_prefix_fmt, path, prefix);
191  else
192  sprintfW(buf, star_fmt, path);
193  return;
194  }
195  if (depth == 0)
196  {
197  size = MAX_PATH;
198  *disp = '\0';
199  hr = IAssemblyName_GetName(name, &size, disp);
200  if (SUCCEEDED(hr))
201  sprintfW(buf, ss_fmt, path, disp);
202  else
203  sprintfW(buf, ss_fmt, path, star);
204  }
205  else if (depth == 1)
206  {
207  major_size = sizeof(major);
208  IAssemblyName_GetProperty(name, ASM_NAME_MAJOR_VERSION, &major, &major_size);
209 
210  minor_size = sizeof(minor);
211  IAssemblyName_GetProperty(name, ASM_NAME_MINOR_VERSION, &minor, &minor_size);
212 
213  build_size = sizeof(build);
214  IAssemblyName_GetProperty(name, ASM_NAME_BUILD_NUMBER, &build, &build_size);
215 
216  revision_size = sizeof(revision);
217  IAssemblyName_GetProperty(name, ASM_NAME_REVISION_NUMBER, &revision, &revision_size);
218 
219  if (!major_size || !minor_size || !build_size || !revision_size) verptr = star;
220  else
221  {
222  sprintfW(version, ver_fmt, major, minor, build, revision);
223  verptr = version;
224  }
225 
226  size = sizeof(token);
227  IAssemblyName_GetProperty(name, ASM_NAME_PUBLIC_KEY_TOKEN, token, &size);
228 
229  if (!size) pubkeyptr = star;
230  else
231  {
232  token_to_str(token, token_str);
233  pubkeyptr = token_str;
234  }
235 
236  if (prefix)
237  sprintfW(buf, ssss_fmt, path, prefix, verptr, pubkeyptr);
238  else
239  sprintfW(buf, sss_fmt, path, verptr, pubkeyptr);
240  }
241 }
242 
243 static int compare_assembly_names(ASMNAME *asmname1, ASMNAME *asmname2)
244 {
245  int ret;
246  WORD version1, version2;
248  WCHAR token_str1[TOKEN_LENGTH + 1], token_str2[TOKEN_LENGTH + 1];
249  BYTE token1[BYTES_PER_TOKEN], token2[BYTES_PER_TOKEN];
250  DWORD size, i;
251 
252  size = sizeof(name1);
253  IAssemblyName_GetProperty(asmname1->name, ASM_NAME_NAME, name1, &size);
254  size = sizeof(name2);
255  IAssemblyName_GetProperty(asmname2->name, ASM_NAME_NAME, name2, &size);
256 
257  if ((ret = strcmpiW(name1, name2))) return ret;
258 
259  for (i = ASM_NAME_MAJOR_VERSION; i < ASM_NAME_CULTURE; i++)
260  {
261  size = sizeof(version1);
262  IAssemblyName_GetProperty(asmname1->name, i, &version1, &size);
263  size = sizeof(version2);
264  IAssemblyName_GetProperty(asmname2->name, i, &version2, &size);
265 
266  if (version1 < version2) return -1;
267  if (version1 > version2) return 1;
268  }
269 
270  /* FIXME: compare cultures */
271 
272  size = sizeof(token1);
273  IAssemblyName_GetProperty(asmname1->name, ASM_NAME_PUBLIC_KEY_TOKEN, token1, &size);
274  size = sizeof(token2);
275  IAssemblyName_GetProperty(asmname2->name, ASM_NAME_PUBLIC_KEY_TOKEN, token2, &size);
276 
277  token_to_str(token1, token_str1);
278  token_to_str(token2, token_str2);
279 
280  if ((ret = strcmpiW(token_str1, token_str2))) return ret;
281 
282  return 0;
283 }
284 
285 /* insert assembly in list preserving sort order */
286 static void insert_assembly(struct list *assemblies, ASMNAME *to_insert)
287 {
288  struct list *item;
289 
290  LIST_FOR_EACH(item, assemblies)
291  {
293 
294  if (compare_assembly_names(name, to_insert) > 0)
295  {
296  list_add_before(&name->entry, &to_insert->entry);
297  return;
298  }
299  }
300  list_add_tail(assemblies, &to_insert->entry);
301 }
302 
303 static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name,
304  int depth, const WCHAR *prefix, LPWSTR path)
305 {
306  static const WCHAR dot[] = {'.',0};
307  static const WCHAR dotdot[] = {'.','.',0};
308  static const WCHAR dblunder[] = {'_','_',0};
309  static const WCHAR path_fmt[] = {'%','s','\\','%','s','\\','%','s','.','d','l','l',0};
310  static const WCHAR name_fmt[] = {'%','s',',',' ','V','e','r','s','i','o','n','=','%','s',',',' ',
311  'C','u','l','t','u','r','e','=','n','e','u','t','r','a','l',',',' ',
312  'P','u','b','l','i','c','K','e','y','T','o','k','e','n','=','%','s',0};
313  static const WCHAR ss_fmt[] = {'%','s','\\','%','s',0};
314  WIN32_FIND_DATAW ffd;
315  WCHAR buf[MAX_PATH], disp[MAX_PATH], asmpath[MAX_PATH], *ptr;
316  static WCHAR parent[MAX_PATH];
317  ASMNAME *asmname;
318  HANDLE hfind;
319  HRESULT hr = S_OK;
320 
321  build_file_mask(name, depth, path, prefix, buf);
322  hfind = FindFirstFileW(buf, &ffd);
323  if (hfind == INVALID_HANDLE_VALUE)
324  return S_OK;
325 
326  do
327  {
328  if (!lstrcmpW(ffd.cFileName, dot) || !lstrcmpW(ffd.cFileName, dotdot))
329  continue;
330 
331  if (depth == 0)
332  {
333  if (name)
334  ptr = strrchrW(buf, '\\') + 1;
335  else
336  ptr = ffd.cFileName;
337 
338  lstrcpyW(parent, ptr);
339  }
340  else if (depth == 1)
341  {
342  const WCHAR *token, *version = ffd.cFileName;
343 
344  sprintfW(asmpath, path_fmt, path, ffd.cFileName, parent);
345  ptr = strstrW(ffd.cFileName, dblunder);
346  *ptr = '\0';
347  token = ptr + 2;
348 
349  if (prefix)
350  {
351  unsigned int prefix_len = strlenW(prefix);
352  if (strlenW(ffd.cFileName) >= prefix_len &&
353  !memicmpW(ffd.cFileName, prefix, prefix_len))
354  version += prefix_len;
355  }
356  sprintfW(disp, name_fmt, parent, version, token);
357 
358  if (!(asmname = heap_alloc(sizeof(*asmname))))
359  {
360  hr = E_OUTOFMEMORY;
361  break;
362  }
363 
364  hr = CreateAssemblyNameObject(&asmname->name, disp,
366  if (FAILED(hr))
367  {
368  heap_free(asmname);
369  break;
370  }
371 
372  hr = IAssemblyName_SetPath(asmname->name, asmpath);
373  if (FAILED(hr))
374  {
375  IAssemblyName_Release(asmname->name);
376  heap_free(asmname);
377  break;
378  }
379 
380  insert_assembly(assemblies, asmname);
381  continue;
382  }
383 
384  sprintfW(buf, ss_fmt, path, ffd.cFileName);
385  hr = enum_gac_assemblies(assemblies, name, depth + 1, prefix, buf);
386  if (FAILED(hr))
387  break;
388  } while (FindNextFileW(hfind, &ffd) != 0);
389 
390  FindClose(hfind);
391  return hr;
392 }
393 
395 {
396  static const WCHAR gac[] = {'\\','G','A','C',0};
397  static const WCHAR gac_32[] = {'\\','G','A','C','_','3','2',0};
398  static const WCHAR gac_64[] = {'\\','G','A','C','_','6','4',0};
399  static const WCHAR gac_msil[] = {'\\','G','A','C','_','M','S','I','L',0};
400  static const WCHAR v40[] = {'v','4','.','0','_',0};
403  HRESULT hr;
404  DWORD size;
405 
406  size = MAX_PATH;
408  if (FAILED(hr))
409  return hr;
410 
411  strcpyW(path, buf);
413  if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
414  {
415  strcpyW(path + size - 1, gac_64);
416  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, v40, path);
417  if (FAILED(hr))
418  return hr;
419  }
420  strcpyW(path + size - 1, gac_32);
421  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, v40, path);
422  if (FAILED(hr))
423  return hr;
424 
425  strcpyW(path + size - 1, gac_msil);
426  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, v40, path);
427  if (FAILED(hr))
428  return hr;
429 
430  size = MAX_PATH;
432  if (FAILED(hr))
433  return hr;
434 
435  strcpyW(path, buf);
436  if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
437  {
438  strcpyW(path + size - 1, gac_64);
439  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path);
440  if (FAILED(hr))
441  return hr;
442  }
443  strcpyW(path + size - 1, gac_32);
444  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path);
445  if (FAILED(hr))
446  return hr;
447 
448  strcpyW(path + size - 1, gac_msil);
449  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path);
450  if (FAILED(hr))
451  return hr;
452 
453  strcpyW(path + size - 1, gac);
454  hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path);
455  if (FAILED(hr))
456  return hr;
457 
458  return S_OK;
459 }
460 
461 /******************************************************************
462  * CreateAssemblyEnum (FUSION.@)
463  */
466 {
467  IAssemblyEnumImpl *asmenum;
468  HRESULT hr;
469 
470  TRACE("(%p, %p, %p, %08x, %p)\n", pEnum, pUnkReserved,
472 
473  if (!pEnum)
474  return E_INVALIDARG;
475 
476  if (dwFlags == 0 || dwFlags == ASM_CACHE_ROOT)
477  return E_INVALIDARG;
478 
479  if (!(asmenum = heap_alloc(sizeof(*asmenum)))) return E_OUTOFMEMORY;
480 
481  asmenum->IAssemblyEnum_iface.lpVtbl = &AssemblyEnumVtbl;
482  asmenum->ref = 1;
483  list_init(&asmenum->assemblies);
484 
485  if (dwFlags & ASM_CACHE_GAC)
486  {
487  hr = enumerate_gac(asmenum, pName);
488  if (FAILED(hr))
489  {
490  heap_free(asmenum);
491  return hr;
492  }
493  }
494 
495  asmenum->iter = list_head(&asmenum->assemblies);
496  *pEnum = &asmenum->IAssemblyEnum_iface;
497 
498  return S_OK;
499 }
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
disp
Definition: i386-dis.c:3181
static const IAssemblyEnumVtbl AssemblyEnumVtbl
Definition: asmenum.c:160
static void token_to_str(BYTE *bytes, LPWSTR str)
Definition: fusionpriv.h:467
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:192
#define REFIID
Definition: guiddef.h:113
#define E_NOINTERFACE
Definition: winerror.h:2364
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
IAssemblyName * name
Definition: asmenum.c:45
static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name, int depth, const WCHAR *prefix, LPWSTR path)
Definition: asmenum.c:303
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
VOID WINAPI GetNativeSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:206
REFIID riid
Definition: precomp.h:44
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
uint8_t entry
Definition: isohybrid.c:63
#define WARN(fmt,...)
Definition: debug.h:111
static IUnknown IAssemblyName * pName
Definition: asmenum.c:33
IAssemblyEnum IAssemblyEnum_iface
Definition: asmenum.c:50
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
struct _tagASMNAME ASMNAME
static WCHAR name1[]
Definition: record.c:34
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
__WINE_SERVER_LIST_INLINE struct list * list_head(const struct list *list)
Definition: list.h:131
struct _test_info info[]
Definition: SetCursorPos.c:19
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
Definition: asmenum.c:394
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 HRESULT WINAPI IAssemblyEnumImpl_GetNextAssembly(IAssemblyEnum *iface, LPVOID pvReserved, IAssemblyName **ppName, DWORD dwFlags)
Definition: asmenum.c:118
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
long LONG
Definition: pedump.c:60
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 token
Definition: glfuncs.h:210
#define FIXME(fmt,...)
Definition: debug.h:110
static PVOID ptr
Definition: dispmode.c:27
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
#define strstrW(d, s)
Definition: unicode.h:32
#define LIST_FOR_EACH(cursor, list)
Definition: list.h:188
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
static int compare_assembly_names(ASMNAME *asmname1, ASMNAME *asmname2)
Definition: asmenum.c:243
#define debugstr_guid
Definition: kernel32.h:35
static ULONG WINAPI IAssemblyEnumImpl_AddRef(IAssemblyEnum *iface)
Definition: asmenum.c:83
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
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
static IAssemblyEnumImpl * impl_from_IAssemblyEnum(IAssemblyEnum *iface)
Definition: asmenum.c:57
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
r parent
Definition: btrfs.c:2659
__wchar_t WCHAR
Definition: xmlstorage.h:180
struct list entry
Definition: asmenum.c:44
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
static void insert_assembly(struct list *assemblies, ASMNAME *to_insert)
Definition: asmenum.c:286
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI CreateAssemblyNameObject(IAssemblyName **ppAssemblyNameObj, LPCWSTR szAssemblyName, DWORD dwFlags, LPVOID pvReserved)
Definition: asmname.c:795
#define PROCESSOR_ARCHITECTURE_AMD64
Definition: ketypes.h:114
static IUnknown * pUnkReserved
Definition: asmenum.c:33
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
int ret
#define InterlockedDecrement
Definition: armddk.h:52
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, PDWORD pcchPath)
Definition: fusion.c:109
unsigned char BYTE
Definition: mem.h:68
Definition: _list.h:228
static HRESULT WINAPI IAssemblyEnumImpl_Reset(IAssemblyEnum *iface)
Definition: asmenum.c:143
static IUnknown IAssemblyName DWORD LPVOID pvReserved
Definition: asmenum.c:33
#define strcmpiW(s1, s2)
Definition: unicode.h:39
WINE_UNICODE_INLINE WCHAR * strrchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:254
HRESULT WINAPI CreateAssemblyEnum(IAssemblyEnum **pEnum, IUnknown *pUnkReserved, IAssemblyName *pName, DWORD dwFlags, LPVOID pvReserved)
Definition: asmenum.c:464
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
static HRESULT WINAPI IAssemblyEnumImpl_QueryInterface(IAssemblyEnum *iface, REFIID riid, LPVOID *ppobj)
Definition: asmenum.c:62
HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path)
Definition: asmname.c:521
#define InterlockedIncrement
Definition: armddk.h:53
static ATOM item
Definition: dde.c:856
const char cursor[]
Definition: icontest.c:13
#define lstrcpyW
Definition: compat.h:406
#define major(rdev)
Definition: propsheet.cpp:879
#define E_NOTIMPL
Definition: ddrawi.h:99
WINE_DEFAULT_DEBUG_CHANNEL(fusion)
Definition: services.c:325
#define sprintfW
Definition: unicode.h:58
static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path, const WCHAR *prefix, WCHAR *buf)
Definition: asmenum.c:169
__WINE_SERVER_LIST_INLINE void list_add_before(struct list *elem, struct list *to_add)
Definition: list.h:87
#define BYTES_PER_TOKEN
Definition: fusionpriv.h:463
Definition: name.c:36
const char star
Definition: hash_test.cpp:23
#define TOKEN_LENGTH
Definition: fusionpriv.h:465
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
unsigned int ULONG
Definition: retypes.h:1
static ULONG WINAPI IAssemblyEnumImpl_Release(IAssemblyEnum *iface)
Definition: asmenum.c:93
#define minor(rdev)
Definition: propsheet.cpp:880
static WCHAR name2[]
Definition: record.c:35
#define memicmpW(s1, s2, n)
Definition: unicode.h:27
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define LIST_ENTRY(type)
Definition: queue.h:175
struct list * iter
Definition: asmenum.c:53
struct list assemblies
Definition: asmenum.c:52
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static HRESULT WINAPI IAssemblyEnumImpl_Clone(IAssemblyEnum *iface, IAssemblyEnum **ppEnum)
Definition: asmenum.c:153
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502