31 #include "wine/unicode.h" 37 #define SHLWAPI_DEF_ASSOCF (ASSOCF_INIT_BYEXENAME|ASSOCF_INIT_DEFAULTTOSTAR| \ 38 ASSOCF_INIT_DEFAULTTOFOLDER) 60 dwStrLen *
sizeof(
WCHAR));
97 *(
DWORD*)lpInterface = 0;
117 '.',
's',
'e',
'a',
'r',
'c',
'h',
'-',
'm',
's',0,
127 '.',
'j',
'f',
'i',
'f',0,
129 '.',
'j',
'p',
'e',
'g',0,
134 '.',
't',
'i',
'f',
'f',0,
141 '.',
'a',
'i',
'f',
'c',0,
142 '.',
'a',
'i',
'f',
'f',0,
146 '.',
'm',
'i',
'd',
'i',0,
147 #if _WIN32_WINNT > 0x602 163 '.',
'd',
'v',
'r',
'-',
'm',
's',0,
166 #if _WIN32_WINNT <= 0x602 169 '.',
'm',
'p',
'2',
'v',0,
172 '.',
'm',
'p',
'e',
'g',0,
174 '.',
'm',
'p',
'v',
'2',0,
188 #if _WIN32_WINNT >= 0x600 190 '.',
'h',
't',
'm',
'l',0,
220 const WCHAR type_compressed[] = {
'c',
'o',
'm',
'p',
'r',
'e',
's',
's',
'e',
'd',0};
223 const WCHAR type_application[] = {
'a',
'p',
'p',
'l',
'i',
'c',
'a',
't',
'i',
'o',
'n',0};
225 #define HARDCODED_NATIVE_WMSDK (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_WMSDK) 226 #define HARDCODED_NATIVE_GDIPLUS (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_GDIPLUS) 227 #define HARDCODED_NATIVE_ZIPFLDR (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_ZIPFOLDER) 228 #define SOFTCODED_NATIVESUPPORT (PERCEIVEDFLAG_SOFTCODED | PERCEIVEDFLAG_NATIVESUPPORT) 298 static const WCHAR PerceivedTypeKey[] = {
'P',
'e',
'r',
'c',
'e',
'i',
'v',
'e',
'd',
'T',
'y',
'p',
'e',0};
299 static const WCHAR SystemFileAssociationsKey[] = {
'S',
'y',
's',
't',
'e',
'm',
'F',
'i',
'l',
'e',
300 'A',
's',
's',
'o',
'c',
'i',
'a',
't',
'i',
'o',
'n',
's',
'\\',
'%',
's',0};
303 TRACE(
"(%s,%p,%p,%p)\n",
debugstr_w(lpszExt), lpType, lpFlag, lppszType);
308 *lpType =
Info->Perceived;
309 *lpFlag =
Info->FlagHardcoded;
333 *lpType =
Info->Perceived;
334 *lpFlag =
Info->FlagSoftcoded;
340 if (lppszType &&
Info->Type)
363 IQueryAssociations* lpAssoc;
368 hRet =
AssocCreate( CLSID_QueryAssociations, &IID_IQueryAssociations, (
void **)&lpAssoc );
369 if (
FAILED(hRet))
return hRet;
410 hRet =
AssocQueryKeyW(cfFlags, assockey, lpszAssocW, lpszExtraW, phkeyOut);
413 if (lpszAssocW != szAssocW)
416 if (lpszExtraW != szExtraW)
431 IQueryAssociations* lpAssoc;
439 hRet =
AssocCreate( CLSID_QueryAssociations, &IID_IQueryAssociations, (
void **)&lpAssoc );
440 if (
FAILED(hRet))
return hRet;
486 DWORD dwLenOut = *pcchOut;
490 (dwLenOut + 1) *
sizeof(
WCHAR));
492 dwLenOut =
sizeof(szReturnW) /
sizeof(szReturnW[0]);
499 lpszReturnW, &dwLenOut);
506 if (lpszReturnW != szReturnW)
511 if (lpszAssocW != szAssocW)
513 if (lpszExtraW != szExtraW)
528 IQueryAssociations* lpAssoc;
530 TRACE(
"(0x%x,0x%d,%p,%s,%p,%p)\n", cfFlags,
str, hkAssoc,
533 hRet =
AssocCreate( CLSID_QueryAssociations, &IID_IQueryAssociations, (
void **)&lpAssoc );
534 if (
FAILED(hRet))
return hRet;
572 TRACE(
"(0x%x,0x%d,%p,%s,%p,%p)\n", cfFlags,
str, hkAssoc,
579 DWORD dwLenOut = *pcchOut;
582 (dwLenOut + 1) *
sizeof(
WCHAR));
587 lpszReturnW, &dwLenOut);
593 if (lpszReturnW != szReturnW)
598 if (lpszExtraW != szExtraW)
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
#define HARDCODED_NATIVE_GDIPLUS
HRESULT WINAPI AssocQueryStringA(ASSOCF cfFlags, ASSOCSTR str, LPCSTR pszAssoc, LPCSTR pszExtra, LPSTR pszOut, DWORD *pcchOut)
static const WCHAR image_exts[]
static BOOL SHLWAPI_ParamAToW(LPCSTR lpszParam, LPWSTR lpszBuff, DWORD dwLen, LPWSTR *lpszOut)
#define HRESULT_FROM_WIN32(x)
static const WCHAR application_exts[]
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
#define WideCharToMultiByte
IN BOOLEAN OUT PSTR Buffer
#define SOFTCODED_NATIVESUPPORT
BOOL WINAPI AssocIsDangerous(LPCWSTR lpszAssoc)
HRESULT WINAPI AssocQueryStringByKeyW(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
static const WCHAR unspecified_exts[]
#define SHLWAPI_DEF_ASSOCF
IN PVOID IN PVOID IN USHORT IN USHORT Size
const WCHAR type_application[]
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
#define IQueryAssociations_GetKey(p, a, b, c, d)
#define CLASS_E_CLASSNOTAVAILABLE
#define HARDCODED_NATIVE_WMSDK
#define HARDCODED_NATIVE_ZIPFLDR
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
static const WCHAR video_exts[]
HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAssoc, LPCWSTR pszExtra, HKEY *phkeyOut)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
HRESULT WINAPI SHCoCreateInstance(LPCWSTR aclsid, const CLSID *clsid, LPUNKNOWN pUnkOuter, REFIID refiid, LPVOID *ppv)
#define ERROR_FILE_NOT_FOUND
static const struct AssocPerceivedInfo known_types[]
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, INT *lpFlag, LPWSTR *lppszType)
WINE_DEFAULT_DEBUG_CHANNEL(shell)
REFFOLDERTYPEID enum tagPERCEIVED PERCEIVED
static struct proto Ext[]
static const WCHAR document_exts[]
HRESULT WINAPI AssocQueryStringByKeyA(ASSOCF cfFlags, ASSOCSTR str, HKEY hkAssoc, LPCSTR pszExtra, LPSTR pszOut, DWORD *pcchOut)
static const WCHAR audio_exts[]
#define IQueryAssociations_Init(p, a, b, c, d)
HRESULT WINAPI AssocQueryKeyA(ASSOCF cfFlags, ASSOCKEY assockey, LPCSTR pszAssoc, LPCSTR pszExtra, HKEY *phkeyOut)
static const WCHAR system_exts[]
static const struct AssocPerceivedInfo * AssocFindByBuiltinExtension(LPCWSTR pszExt)
const WCHAR type_compressed[]
void shell(int argc, const char *argv[])
const WCHAR type_document[]
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
#define MultiByteToWideChar
static const WCHAR compressed_exts[]
static const struct AssocPerceivedInfo * AssocFindByType(LPCWSTR pszType)
#define IQueryAssociations_GetString(p, a, b, c, d, e)
const WCHAR type_system[]
HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface)
#define HKEY_CLASSES_ROOT
#define HeapFree(x, y, z)
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
#define IQueryAssociations_Release(p)