From f2d40ca87d5ef9cfc7ef19c2146062f8461ff905 Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Sun, 8 Apr 2012 15:22:25 +0200 Subject: [PATCH] shlwapi: Add stub for AssocGetPerceivedType. --- dlls/shlwapi/assoc.c | 36 ++++++++++++++++++++++++++++++++++++ dlls/shlwapi/shlwapi.spec | 1 + 2 files changed, 37 insertions(+) diff --git a/dlls/shlwapi/assoc.c b/dlls/shlwapi/assoc.c index 877f51484ea..4ecc9220f11 100644 --- a/dlls/shlwapi/assoc.c +++ b/dlls/shlwapi/assoc.c @@ -103,6 +103,42 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface) } /************************************************************************* + * AssocGetPerceivedType [SHLWAPI.@] + * + * Detect the type of a file by inspecting its extension + * + * PARAMS + * lpszExt [I] File extension to evaluate. + * lpType [O] Pointer to perceived type + * lpFlag [O] Pointer to perceived type flag + * lppszType [O] Address to pointer for perceived type text + * + * RETURNS + * Success: S_OK. lpType and lpFlag contain the perceived type and + * its informations. If lppszType is not NULL, it will point + * to a string with perceived type text. + * Failure: An HRESULT error code indicating the error. + * + * NOTES + * lppszType is optional and it can be NULL. + * if lpType or lpFlag are NULL, the function will crash. + * if lpszExt is NULL, an error is returned. + * + * BUGS + * Unimplemented. + */ +HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, + INT *lpFlag, LPWSTR *lppszType) +{ + FIXME("(%s, %p, %p, %p) not supported\n", debugstr_w(lpszExt), lpType, lpFlag, lppszType); + + if (lpszExt == NULL) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + return E_NOTIMPL; +} + +/************************************************************************* * AssocQueryKeyW [SHLWAPI.@] * * See AssocQueryKeyA. diff --git a/dlls/shlwapi/shlwapi.spec b/dlls/shlwapi/shlwapi.spec index 40e2ee96ed1..e0bdcf104a1 100644 --- a/dlls/shlwapi/shlwapi.spec +++ b/dlls/shlwapi/shlwapi.spec @@ -547,6 +547,7 @@ 551 stub -noname IShellFolder_CompareIDs @ stdcall AssocCreate(int128 ptr ptr) +@ stdcall AssocGetPerceivedType(wstr ptr ptr ptr) @ stdcall AssocIsDangerous(long) @ stdcall AssocQueryKeyA(long long str ptr ptr) @ stdcall AssocQueryKeyW(long long wstr ptr ptr) -- 2.11.4.GIT