2 * IQueryAssociations object and helper functions
4 * Copyright 2002 Jon Griffiths
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.
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.
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
30 #include "wine/unicode.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(shell);
35 /**************************************************************************
36 * IQueryAssociations {SHLWAPI}
39 * This object provides a layer of abstraction over the system registry in
40 * order to simplify the process of parsing associations between files.
41 * Associations in this context means the registry entries that link (for
42 * example) the extension of a file with its description, list of
43 * applications to open the file with, and actions that can be performed on it
44 * (the shell displays such information in the context menu of explorer
45 * when you right-click on a file).
48 * You can use this object transparently by calling the helper functions
49 * AssocQueryKeyA(), AssocQueryStringA() and AssocQueryStringByKeyA(). These
50 * create an IQueryAssociations object, perform the requested actions
51 * and then dispose of the object. Alternatively, you can create an instance
52 * of the object using AssocCreate() and call the following methods on it:
57 /* Default IQueryAssociations::Init() flags */
58 #define SHLWAPI_DEF_ASSOCF (ASSOCF_INIT_BYEXENAME|ASSOCF_INIT_DEFAULTTOSTAR| \
59 ASSOCF_INIT_DEFAULTTOFOLDER)
63 const IQueryAssociationsVtbl *lpVtbl;
67 } IQueryAssociationsImpl;
69 static const IQueryAssociationsVtbl IQueryAssociations_vtbl;
71 /**************************************************************************
72 * IQueryAssociations_Constructor [internal]
74 * Construct a new IQueryAssociations object.
76 static IQueryAssociations* IQueryAssociations_Constructor(void)
78 IQueryAssociationsImpl* iface;
80 iface = HeapAlloc(GetProcessHeap(),0,sizeof(IQueryAssociationsImpl));
81 iface->lpVtbl = &IQueryAssociations_vtbl;
83 iface->hkeySource = NULL;
84 iface->hkeyProgID = NULL;
86 TRACE("Returning IQueryAssociations* %p\n", iface);
87 return (IQueryAssociations*)iface;
90 /*************************************************************************
93 * Internal helper function: Convert ASCII parameter to Unicode.
95 static BOOL SHLWAPI_ParamAToW(LPCSTR lpszParam, LPWSTR lpszBuff, DWORD dwLen,
100 DWORD dwStrLen = MultiByteToWideChar(CP_ACP, 0, lpszParam, -1, NULL, 0);
102 if (dwStrLen < dwLen)
104 *lpszOut = lpszBuff; /* Use Buffer, it is big enough */
108 /* Create a new buffer big enough for the string */
109 *lpszOut = HeapAlloc(GetProcessHeap(), 0,
110 dwStrLen * sizeof(WCHAR));
114 MultiByteToWideChar(CP_ACP, 0, lpszParam, -1, *lpszOut, dwStrLen);
121 /*************************************************************************
122 * AssocCreate [SHLWAPI.@]
124 * Create a new IQueryAssociations object.
127 * clsid [I] CLSID of object
128 * refiid [I] REFIID of interface
129 * lpInterface [O] Destination for the created IQueryAssociations object
132 * Success: S_OK. lpInterface contains the new object.
133 * Failure: An HRESULT error code indicating the error.
136 * refiid must be equal to IID_IQueryAssociations, or this function will fail.
138 HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
141 IQueryAssociations* lpAssoc;
143 TRACE("(%s,%s,%p)\n", debugstr_guid(&clsid), debugstr_guid(refiid),
149 *(DWORD*)lpInterface = 0;
151 if (!IsEqualGUID(&clsid, &IID_IQueryAssociations))
154 lpAssoc = IQueryAssociations_Constructor();
157 return E_OUTOFMEMORY;
159 hRet = IQueryAssociations_QueryInterface(lpAssoc, refiid, lpInterface);
160 IQueryAssociations_Release(lpAssoc);
164 /*************************************************************************
165 * AssocQueryKeyW [SHLWAPI.@]
167 * See AssocQueryKeyA.
169 HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAssoc,
170 LPCWSTR pszExtra, HKEY *phkeyOut)
173 IQueryAssociations* lpAssoc;
175 TRACE("(0x%8x,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_w(pszAssoc),
176 debugstr_w(pszExtra), phkeyOut);
178 lpAssoc = IQueryAssociations_Constructor();
181 return E_OUTOFMEMORY;
183 cfFlags &= SHLWAPI_DEF_ASSOCF;
184 hRet = IQueryAssociations_Init(lpAssoc, cfFlags, pszAssoc, NULL, NULL);
187 hRet = IQueryAssociations_GetKey(lpAssoc, cfFlags, assockey, pszExtra, phkeyOut);
189 IQueryAssociations_Release(lpAssoc);
193 /*************************************************************************
194 * AssocQueryKeyA [SHLWAPI.@]
196 * Get a file association key from the registry.
199 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
200 * assockey [I] Type of key to get
201 * pszAssoc [I] Key name to search below
202 * pszExtra [I] Extra information about the key location
203 * phkeyOut [O] Destination for the association key
206 * Success: S_OK. phkeyOut contains the key.
207 * Failure: An HRESULT error code indicating the error.
209 HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc,
210 LPCSTR pszExtra, HKEY *phkeyOut)
212 WCHAR szAssocW[MAX_PATH], *lpszAssocW = NULL;
213 WCHAR szExtraW[MAX_PATH], *lpszExtraW = NULL;
214 HRESULT hRet = E_OUTOFMEMORY;
216 TRACE("(0x%8x,0x%8x,%s,%s,%p)\n", cfFlags, assockey, debugstr_a(pszAssoc),
217 debugstr_a(pszExtra), phkeyOut);
219 if (SHLWAPI_ParamAToW(pszAssoc, szAssocW, MAX_PATH, &lpszAssocW) &&
220 SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
222 hRet = AssocQueryKeyW(cfFlags, assockey, lpszAssocW, lpszExtraW, phkeyOut);
225 if (lpszAssocW != szAssocW)
226 HeapFree(GetProcessHeap(), 0, lpszAssocW);
228 if (lpszExtraW != szExtraW)
229 HeapFree(GetProcessHeap(), 0, lpszExtraW);
234 /*************************************************************************
235 * AssocQueryStringW [SHLWAPI.@]
237 * See AssocQueryStringA.
239 HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc,
240 LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
243 IQueryAssociations* lpAssoc;
245 TRACE("(0x%8x,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_w(pszAssoc),
246 debugstr_w(pszExtra), pszOut, pcchOut);
251 lpAssoc = IQueryAssociations_Constructor();
254 return E_OUTOFMEMORY;
256 hRet = IQueryAssociations_Init(lpAssoc, cfFlags & SHLWAPI_DEF_ASSOCF,
257 pszAssoc, NULL, NULL);
260 hRet = IQueryAssociations_GetString(lpAssoc, cfFlags, str, pszExtra,
263 IQueryAssociations_Release(lpAssoc);
267 /*************************************************************************
268 * AssocQueryStringA [SHLWAPI.@]
270 * Get a file association string from the registry.
273 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
274 * str [I] Type of string to get (ASSOCSTR enum from "shlwapi.h")
275 * pszAssoc [I] Key name to search below
276 * pszExtra [I] Extra information about the string location
277 * pszOut [O] Destination for the association string
278 * pcchOut [O] Length of pszOut
281 * Success: S_OK. pszOut contains the string, pcchOut contains its length.
282 * Failure: An HRESULT error code indicating the error.
284 HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc,
285 LPCSTR pszExtra, LPSTR pszOut, DWORD *pcchOut)
287 WCHAR szAssocW[MAX_PATH], *lpszAssocW = NULL;
288 WCHAR szExtraW[MAX_PATH], *lpszExtraW = NULL;
289 HRESULT hRet = E_OUTOFMEMORY;
291 TRACE("(0x%8x,0x%8x,%s,%s,%p,%p)\n", cfFlags, str, debugstr_a(pszAssoc),
292 debugstr_a(pszExtra), pszOut, pcchOut);
296 else if (SHLWAPI_ParamAToW(pszAssoc, szAssocW, MAX_PATH, &lpszAssocW) &&
297 SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
299 WCHAR szReturnW[MAX_PATH], *lpszReturnW = szReturnW;
300 DWORD dwLenOut = *pcchOut;
302 if (dwLenOut >= MAX_PATH)
303 lpszReturnW = HeapAlloc(GetProcessHeap(), 0,
304 (dwLenOut + 1) * sizeof(WCHAR));
307 hRet = E_OUTOFMEMORY;
310 hRet = AssocQueryStringW(cfFlags, str, lpszAssocW, lpszExtraW,
311 lpszReturnW, &dwLenOut);
314 WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
317 if (lpszReturnW != szReturnW)
318 HeapFree(GetProcessHeap(), 0, lpszReturnW);
322 if (lpszAssocW != szAssocW)
323 HeapFree(GetProcessHeap(), 0, lpszAssocW);
324 if (lpszExtraW != szExtraW)
325 HeapFree(GetProcessHeap(), 0, lpszExtraW);
329 /*************************************************************************
330 * AssocQueryStringByKeyW [SHLWAPI.@]
332 * See AssocQueryStringByKeyA.
334 HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc,
335 LPCWSTR pszExtra, LPWSTR pszOut,
339 IQueryAssociations* lpAssoc;
341 TRACE("(0x%8x,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
342 debugstr_w(pszExtra), pszOut, pcchOut);
344 lpAssoc = IQueryAssociations_Constructor();
347 return E_OUTOFMEMORY;
349 cfFlags &= SHLWAPI_DEF_ASSOCF;
350 hRet = IQueryAssociations_Init(lpAssoc, cfFlags, 0, hkAssoc, NULL);
353 hRet = IQueryAssociations_GetString(lpAssoc, cfFlags, str, pszExtra,
356 IQueryAssociations_Release(lpAssoc);
360 /*************************************************************************
361 * AssocQueryStringByKeyA [SHLWAPI.@]
363 * Get a file association string from the registry, given a starting key.
366 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
367 * str [I] Type of string to get
368 * hkAssoc [I] Key to search below
369 * pszExtra [I] Extra information about the string location
370 * pszOut [O] Destination for the association string
371 * pcchOut [O] Length of pszOut
374 * Success: S_OK. pszOut contains the string, pcchOut contains its length.
375 * Failure: An HRESULT error code indicating the error.
377 HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc,
378 LPCSTR pszExtra, LPSTR pszOut,
381 WCHAR szExtraW[MAX_PATH], *lpszExtraW = szExtraW;
382 WCHAR szReturnW[MAX_PATH], *lpszReturnW = szReturnW;
383 HRESULT hRet = E_OUTOFMEMORY;
385 TRACE("(0x%8x,0x%8x,%p,%s,%p,%p)\n", cfFlags, str, hkAssoc,
386 debugstr_a(pszExtra), pszOut, pcchOut);
390 else if (SHLWAPI_ParamAToW(pszExtra, szExtraW, MAX_PATH, &lpszExtraW))
392 DWORD dwLenOut = *pcchOut;
393 if (dwLenOut >= MAX_PATH)
394 lpszReturnW = HeapAlloc(GetProcessHeap(), 0,
395 (dwLenOut + 1) * sizeof(WCHAR));
399 hRet = AssocQueryStringByKeyW(cfFlags, str, hkAssoc, lpszExtraW,
400 lpszReturnW, &dwLenOut);
403 WideCharToMultiByte(CP_ACP,0,szReturnW,-1,pszOut,dwLenOut,0,0);
406 if (lpszReturnW != szReturnW)
407 HeapFree(GetProcessHeap(), 0, lpszReturnW);
411 if (lpszExtraW != szExtraW)
412 HeapFree(GetProcessHeap(), 0, lpszExtraW);
417 /**************************************************************************
418 * AssocIsDangerous (SHLWAPI.@)
420 * Determine if a file association is dangerous (potentially malware).
423 * lpszAssoc [I] Name of file or file extension to check.
426 * TRUE, if lpszAssoc may potentially be malware (executable),
429 BOOL WINAPI AssocIsDangerous(LPCWSTR lpszAssoc)
431 FIXME("%s\n", debugstr_w(lpszAssoc));
435 /**************************************************************************
436 * IQueryAssociations_QueryInterface {SHLWAPI}
438 * See IUnknown_QueryInterface.
440 static HRESULT WINAPI IQueryAssociations_fnQueryInterface(
441 IQueryAssociations* iface,
445 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
447 TRACE("(%p,%s,%p)\n",This, debugstr_guid(riid), ppvObj);
451 if (IsEqualIID(riid, &IID_IUnknown) ||
452 IsEqualIID(riid, &IID_IQueryAssociations))
454 *ppvObj = (IQueryAssociations*)This;
456 IQueryAssociations_AddRef((IQueryAssociations*)*ppvObj);
457 TRACE("Returning IQueryAssociations (%p)\n", *ppvObj);
460 TRACE("Returning E_NOINTERFACE\n");
461 return E_NOINTERFACE;
464 /**************************************************************************
465 * IQueryAssociations_AddRef {SHLWAPI}
467 * See IUnknown_AddRef.
469 static ULONG WINAPI IQueryAssociations_fnAddRef(IQueryAssociations *iface)
471 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
472 ULONG refCount = InterlockedIncrement(&This->ref);
474 TRACE("(%p)->(ref before=%u)\n",This, refCount - 1);
479 /**************************************************************************
480 * IQueryAssociations_Release {SHLWAPI}
482 * See IUnknown_Release.
484 static ULONG WINAPI IQueryAssociations_fnRelease(IQueryAssociations *iface)
486 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
487 ULONG refCount = InterlockedDecrement(&This->ref);
489 TRACE("(%p)->(ref before=%u)\n",This, refCount + 1);
493 TRACE("Destroying IQueryAssociations (%p)\n", This);
494 RegCloseKey(This->hkeySource);
495 RegCloseKey(This->hkeyProgID);
496 HeapFree(GetProcessHeap(), 0, This);
502 /**************************************************************************
503 * IQueryAssociations_Init {SHLWAPI}
505 * Initialise an IQueryAssociations object.
508 * iface [I] IQueryAssociations interface to initialise
509 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
510 * pszAssoc [I] String for the root key name, or NULL if hkeyProgid is given
511 * hkeyProgid [I] Handle for the root key, or NULL if pszAssoc is given
512 * hWnd [I] Reserved, must be NULL.
515 * Success: S_OK. iface is initialised with the parameters given.
516 * Failure: An HRESULT error code indicating the error.
518 static HRESULT WINAPI IQueryAssociations_fnInit(
519 IQueryAssociations *iface,
525 static const WCHAR szProgID[] = {'P','r','o','g','I','D',0};
526 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
529 TRACE("(%p)->(%d,%s,%p,%p)\n", iface,
531 debugstr_w(pszAssoc),
535 FIXME("hwnd != NULL not supported\n");
537 FIXME("unsupported flags: %x\n", cfFlags);
538 if (pszAssoc != NULL)
540 ret = RegOpenKeyExW(HKEY_CLASSES_ROOT,
545 if (ret != ERROR_SUCCESS)
547 /* if this is not a prog id */
548 if ((*pszAssoc == '.') || (*pszAssoc == '{'))
550 RegOpenKeyExW(This->hkeySource,
557 This->hkeyProgID = This->hkeySource;
560 else if (hkeyProgid != NULL)
562 This->hkeyProgID = hkeyProgid;
569 static HRESULT ASSOC_GetValue(HKEY hkey, WCHAR ** pszText)
575 ret = RegQueryValueExW(hkey, NULL, 0, NULL, NULL, &len);
576 if (ret != ERROR_SUCCESS)
577 return HRESULT_FROM_WIN32(ret);
580 *pszText = HeapAlloc(GetProcessHeap(), 0, len);
582 return E_OUTOFMEMORY;
583 ret = RegQueryValueExW(hkey, NULL, 0, NULL, (LPBYTE)*pszText,
585 if (ret != ERROR_SUCCESS)
587 HeapFree(GetProcessHeap(), 0, *pszText);
588 return HRESULT_FROM_WIN32(ret);
593 static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This,
594 LPCWSTR pszExtra, LPWSTR path,
595 DWORD pathlen, DWORD *len)
605 WCHAR * pszExtraFromReg;
608 static const WCHAR commandW[] = { 'c','o','m','m','a','n','d',0 };
609 static const WCHAR shellW[] = { 's','h','e','l','l',0 };
613 hr = ASSOC_GetValue(This->hkeySource, &pszFileType);
616 ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, pszFileType, 0, KEY_READ, &hkeyFile);
617 HeapFree(GetProcessHeap(), 0, pszFileType);
618 if (ret != ERROR_SUCCESS)
619 return HRESULT_FROM_WIN32(ret);
621 ret = RegOpenKeyExW(hkeyFile, shellW, 0, KEY_READ, &hkeyShell);
622 RegCloseKey(hkeyFile);
623 if (ret != ERROR_SUCCESS)
624 return HRESULT_FROM_WIN32(ret);
628 hr = ASSOC_GetValue(hkeyShell, &pszExtraFromReg);
631 RegCloseKey(hkeyShell);
636 ret = RegOpenKeyExW(hkeyShell, pszExtra ? pszExtra : pszExtraFromReg, 0,
637 KEY_READ, &hkeyVerb);
638 HeapFree(GetProcessHeap(), 0, pszExtraFromReg);
639 RegCloseKey(hkeyShell);
640 if (ret != ERROR_SUCCESS)
641 return HRESULT_FROM_WIN32(ret);
643 ret = RegOpenKeyExW(hkeyVerb, commandW, 0, KEY_READ, &hkeyCommand);
644 RegCloseKey(hkeyVerb);
645 if (ret != ERROR_SUCCESS)
646 return HRESULT_FROM_WIN32(ret);
647 hr = ASSOC_GetValue(hkeyCommand, &pszCommand);
648 RegCloseKey(hkeyCommand);
652 /* cleanup pszCommand */
653 if (pszCommand[0] == '"')
655 pszStart = pszCommand + 1;
656 pszEnd = strchrW(pszStart, '"');
660 pszStart = pszCommand;
661 pszEnd = strchrW(pszStart, ' ');
666 *len = SearchPathW(NULL, pszStart, NULL, pathlen, path, NULL);
667 HeapFree(GetProcessHeap(), 0, pszCommand);
669 return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
673 static HRESULT ASSOC_ReturnData(LPWSTR out, DWORD *outlen, LPCWSTR data,
680 if (*outlen < datalen)
686 lstrcpynW(out, data, datalen);
696 /**************************************************************************
697 * IQueryAssociations_GetString {SHLWAPI}
699 * Get a file association string from the registry.
702 * iface [I] IQueryAssociations interface to query
703 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
704 * str [I] Type of string to get (ASSOCSTR enum from "shlwapi.h")
705 * pszExtra [I] Extra information about the string location
706 * pszOut [O] Destination for the association string
707 * pcchOut [I/O] Length of pszOut
710 * Success: S_OK. pszOut contains the string, pcchOut contains its length.
711 * Failure: An HRESULT error code indicating the error.
713 static HRESULT WINAPI IQueryAssociations_fnGetString(
714 IQueryAssociations *iface,
721 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
722 const ASSOCF cfUnimplemented = ~(0);
725 WCHAR path[MAX_PATH];
727 TRACE("(%p,0x%8x,0x%8x,%s,%p,%p)\n", This, cfFlags, str,
728 debugstr_w(pszExtra), pszOut, pcchOut);
730 if (cfFlags & cfUnimplemented)
731 FIXME("%08x: unimplemented flags!\n", cfFlags & cfUnimplemented);
738 case ASSOCSTR_EXECUTABLE:
740 hr = ASSOC_GetExecutable(This, pszExtra, path, MAX_PATH, &len);
744 return ASSOC_ReturnData(pszOut, pcchOut, path, len);
749 FIXME("assocstr %d unimplemented!\n", str);
754 /**************************************************************************
755 * IQueryAssociations_GetKey {SHLWAPI}
757 * Get a file association key from the registry.
760 * iface [I] IQueryAssociations interface to query
761 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
762 * assockey [I] Type of key to get (ASSOCKEY enum from "shlwapi.h")
763 * pszExtra [I] Extra information about the key location
764 * phkeyOut [O] Destination for the association key
767 * Success: S_OK. phkeyOut contains a handle to the key.
768 * Failure: An HRESULT error code indicating the error.
770 static HRESULT WINAPI IQueryAssociations_fnGetKey(
771 IQueryAssociations *iface,
777 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
779 FIXME("(%p,0x%8x,0x%8x,%s,%p)-stub!\n", This, cfFlags, assockey,
780 debugstr_w(pszExtra), phkeyOut);
784 /**************************************************************************
785 * IQueryAssociations_GetData {SHLWAPI}
787 * Get the data for a file association key from the registry.
790 * iface [I] IQueryAssociations interface to query
791 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
792 * assocdata [I] Type of data to get (ASSOCDATA enum from "shlwapi.h")
793 * pszExtra [I] Extra information about the data location
794 * pvOut [O] Destination for the association key
795 * pcbOut [I/O] Size of pvOut
798 * Success: S_OK. pszOut contains the data, pcbOut contains its length.
799 * Failure: An HRESULT error code indicating the error.
801 static HRESULT WINAPI IQueryAssociations_fnGetData(
802 IQueryAssociations *iface,
809 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
811 FIXME("(%p,0x%8x,0x%8x,%s,%p,%p)-stub!\n", This, cfFlags, assocdata,
812 debugstr_w(pszExtra), pvOut, pcbOut);
816 /**************************************************************************
817 * IQueryAssociations_GetEnum {SHLWAPI}
819 * Not yet implemented in native Win32.
822 * iface [I] IQueryAssociations interface to query
823 * cfFlags [I] ASSOCF_ flags from "shlwapi.h"
824 * assocenum [I] Type of enum to get (ASSOCENUM enum from "shlwapi.h")
825 * pszExtra [I] Extra information about the enum location
826 * riid [I] REFIID to look for
827 * ppvOut [O] Destination for the interface.
831 * Failure: An HRESULT error code indicating the error.
834 * Presumably this function returns an enumerator object.
836 static HRESULT WINAPI IQueryAssociations_fnGetEnum(
837 IQueryAssociations *iface,
844 IQueryAssociationsImpl *This = (IQueryAssociationsImpl *)iface;
846 FIXME("(%p,0x%8x,0x%8x,%s,%s,%p)-stub!\n", This, cfFlags, assocenum,
847 debugstr_w(pszExtra), debugstr_guid(riid), ppvOut);
851 static const IQueryAssociationsVtbl IQueryAssociations_vtbl =
853 IQueryAssociations_fnQueryInterface,
854 IQueryAssociations_fnAddRef,
855 IQueryAssociations_fnRelease,
856 IQueryAssociations_fnInit,
857 IQueryAssociations_fnGetString,
858 IQueryAssociations_fnGetKey,
859 IQueryAssociations_fnGetData,
860 IQueryAssociations_fnGetEnum