Commit 3c216d01 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Removed linking by GetProcAddress for StrRetToBuf sinc not all

versions of shlwapi exporting this function.
parent 8c81b743
......@@ -117,8 +117,6 @@ extern HRESULT (WINAPI *COMDLG32_SHGetSpecialFolderLocation)(HWND,INT,LPITEMIDLI
extern DWORD (WINAPI *COMDLG32_SHGetDesktopFolder)(IShellFolder **);
extern DWORD (WINAPI *COMDLG32_SHGetFileInfoA)(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
extern DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
extern HRESULT (WINAPI *COMDLG32_StrRetToBufW)(LPSTRRET,LPITEMIDLIST,LPVOID,DWORD);
extern HRESULT (WINAPI *COMDLG32_StrRetToBufA)(LPSTRRET,LPITEMIDLIST,LPVOID,DWORD);
/* PATH */
extern BOOL (WINAPI *COMDLG32_PathIsRootA)(LPCSTR x);
......
......@@ -52,8 +52,6 @@ HRESULT (WINAPI *COMDLG32_SHGetSpecialFolderLocation)(HWND,INT,LPITEMIDLIST *);
DWORD (WINAPI *COMDLG32_SHGetDesktopFolder)(IShellFolder **);
DWORD (WINAPI *COMDLG32_SHGetFileInfoA)(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
HRESULT (WINAPI *COMDLG32_StrRetToBufW)(LPSTRRET,LPITEMIDLIST,LPVOID,DWORD);
HRESULT (WINAPI *COMDLG32_StrRetToBufA)(LPSTRRET,LPITEMIDLIST,LPVOID,DWORD);
/* PATH */
BOOL (WINAPI *COMDLG32_PathIsRootA)(LPCSTR x);
......@@ -147,10 +145,13 @@ BOOL WINAPI COMDLG32_DllEntryPoint(HINSTANCE hInstance, DWORD Reason, LPVOID Res
COMDLG32_SHGetDesktopFolder = (void*)GetProcAddress(SHELL32_hInstance,"SHGetDesktopFolder");
COMDLG32_SHGetFileInfoA = (void*)GetProcAddress(SHELL32_hInstance,"SHGetFileInfoA");
/* FIXME - change the followings to call GetProcAddress
when shlwapi.dll will work */
COMDLG32_StrRetToBufW = (void*)GetProcAddress(SHLWAPI_hInstance,"StrRetToBufW");
COMDLG32_StrRetToBufA = (void*)GetProcAddress(SHLWAPI_hInstance,"StrRetToBufA");
/* ### WARINIG ###
We can't do a GetProcAddress to link to StrRetToBuf[A|W] sine not all
versions of the shlwapi are exporting these functions. When we are
seperating the dlls then we have to dublicate code from shell32 into comdlg32.
Till then just call these functions. These functions don't have any side effects
so it won't break the use of any combination of native and buildin dll's (jsch) */
/* PATH */
COMDLG32_PathMatchSpecW = (void*)GetProcAddress(SHLWAPI_hInstance,"PathMatchSpecW");
COMDLG32_PathIsRootA = (void*)GetProcAddress(SHLWAPI_hInstance,"PathIsRootA");
......
......@@ -1908,7 +1908,7 @@ HRESULT GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPSTR lpstrF
dwFlags,
&str)))
{
return COMDLG32_StrRetToBufA(&str, pidl,lpstrFileName, MAX_PATH);
return StrRetToBufA(&str, pidl,lpstrFileName, MAX_PATH);
}
return E_FAIL;
}
......
......@@ -717,7 +717,7 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *
return S_OK;
if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_FORPARSING, &str)))
{ if (SUCCEEDED(COMDLG32_StrRetToBufW(&str, pidl,szPathW, MAX_PATH)))
{ if (SUCCEEDED(StrRetToBufW(&str, pidl,szPathW, MAX_PATH)))
{
if (COMDLG32_PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))
return S_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment