Commit 15c00627 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

comdlg32: Don't use GetProcAddress for SHSimpleIDListFromPath.

The function is exported by name from shell32 and declared in a public header.
parent 2c235b6f
......@@ -182,9 +182,6 @@ void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText) DECLSPEC_HIDD
extern BOOL GetFileName31A( OPENFILENAMEA *lpofn, UINT dlgType ) DECLSPEC_HIDDEN;
extern BOOL GetFileName31W( OPENFILENAMEW *lpofn, UINT dlgType ) DECLSPEC_HIDDEN;
/* SHELL */
extern LPITEMIDLIST (WINAPI *COMDLG32_SHSimpleIDListFromPathAW)(LPCVOID);
#define ONOPEN_BROWSE 1
#define ONOPEN_OPEN 2
#define ONOPEN_SEARCH 3
......
......@@ -43,11 +43,6 @@ DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance = 0;
static DWORD COMDLG32_TlsIndex = TLS_OUT_OF_INDEXES;
static HINSTANCE SHELL32_hInstance;
/* SHELL */
LPITEMIDLIST (WINAPI *COMDLG32_SHSimpleIDListFromPathAW)(LPCVOID) DECLSPEC_HIDDEN;
/***********************************************************************
* DllMain (COMDLG32.init)
*
......@@ -57,14 +52,6 @@ LPITEMIDLIST (WINAPI *COMDLG32_SHSimpleIDListFromPathAW)(LPCVOID) DECLSPEC_HIDDE
* FALSE if sibling could not be loaded or instantiated twice, TRUE
* otherwise.
*/
static const char GPA_string[] = "Failed to get entry point %s for hinst = %p\n";
#define GPA(dest, hinst, name) \
if(!(dest = (void*)GetProcAddress(hinst,name)))\
{ \
ERR(GPA_string, debugstr_a(name), hinst); \
return FALSE; \
}
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
{
TRACE("(%p, %ld, %p)\n", hInstance, Reason, Reserved);
......@@ -74,11 +61,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved)
case DLL_PROCESS_ATTACH:
COMDLG32_hInstance = hInstance;
DisableThreadLibraryCalls(hInstance);
SHELL32_hInstance = GetModuleHandleA("SHELL32.DLL");
/* SHELL */
GPA(COMDLG32_SHSimpleIDListFromPathAW, SHELL32_hInstance, (LPCSTR)162);
break;
case DLL_PROCESS_DETACH:
......
......@@ -599,7 +599,7 @@ static HRESULT on_default_action(FileDialogImpl *This)
}
}
pidla[i] = COMDLG32_SHSimpleIDListFromPathAW(canon_filename);
pidla[i] = SHSimpleIDListFromPath(canon_filename);
if(psf_parent && !(open_action == ONOPEN_BROWSE))
IShellFolder_Release(psf_parent);
......
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