Bug 969918 - Use decltype to declare pointers for dynamic-loaded functions. r=jimm sr=roc
This commit is contained in:
@@ -606,9 +606,6 @@ nsWindowsShellService::GetCanSetDesktopBackground(bool* aResult)
|
||||
static nsresult
|
||||
DynSHOpenWithDialog(HWND hwndParent, const OPENASINFO *poainfo)
|
||||
{
|
||||
typedef HRESULT (WINAPI * SHOpenWithDialogPtr)(HWND hwndParent,
|
||||
const OPENASINFO *poainfo);
|
||||
|
||||
// shell32.dll is in the knownDLLs list so will always be loaded from the
|
||||
// system32 directory.
|
||||
static const wchar_t kSehllLibraryName[] = L"shell32.dll";
|
||||
@@ -617,8 +614,8 @@ DynSHOpenWithDialog(HWND hwndParent, const OPENASINFO *poainfo)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
SHOpenWithDialogPtr SHOpenWithDialogFn =
|
||||
(SHOpenWithDialogPtr)GetProcAddress(shellDLL, "SHOpenWithDialog");
|
||||
decltype(SHOpenWithDialog)* SHOpenWithDialogFn =
|
||||
(decltype(SHOpenWithDialog)*) GetProcAddress(shellDLL, "SHOpenWithDialog");
|
||||
|
||||
if (!SHOpenWithDialogFn) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user