summaryrefslogtreecommitdiffstats
path: root/widget/windows/WinUtils.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-23 23:45:46 +0000
commit9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f (patch)
tree831e0ae1649d6135429def03688bc93ff7c86b03 /widget/windows/WinUtils.cpp
parent42f895f27f239e973c9c06241f7a58da7381353c (diff)
parentf624bd1375655dea196cdcb70a9860bc5817df49 (diff)
downloadUXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar
UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar.gz
UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar.lz
UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.tar.xz
UXP-9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f.zip
Merge branch 'redwood' into releaseRELBASE_20200929RC_20200924
Diffstat (limited to 'widget/windows/WinUtils.cpp')
-rw-r--r--widget/windows/WinUtils.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp
index bd42e78f6..28033193f 100644
--- a/widget/windows/WinUtils.cpp
+++ b/widget/windows/WinUtils.cpp
@@ -419,26 +419,10 @@ const char FaviconHelper::kShortcutCacheDir[] = "shortcutCache";
// apis available on vista and up.
WinUtils::SHCreateItemFromParsingNamePtr WinUtils::sCreateItemFromParsingName = nullptr;
-WinUtils::SHGetKnownFolderPathPtr WinUtils::sGetKnownFolderPath = nullptr;
-
// We just leak these DLL HMODULEs. There's no point in calling FreeLibrary
// on them during shutdown anyway.
static const wchar_t kShellLibraryName[] = L"shell32.dll";
static HMODULE sShellDll = nullptr;
-static const wchar_t kDwmLibraryName[] = L"dwmapi.dll";
-static HMODULE sDwmDll = nullptr;
-
-WinUtils::DwmExtendFrameIntoClientAreaProc WinUtils::dwmExtendFrameIntoClientAreaPtr = nullptr;
-WinUtils::DwmIsCompositionEnabledProc WinUtils::dwmIsCompositionEnabledPtr = nullptr;
-WinUtils::DwmSetIconicThumbnailProc WinUtils::dwmSetIconicThumbnailPtr = nullptr;
-WinUtils::DwmSetIconicLivePreviewBitmapProc WinUtils::dwmSetIconicLivePreviewBitmapPtr = nullptr;
-WinUtils::DwmGetWindowAttributeProc WinUtils::dwmGetWindowAttributePtr = nullptr;
-WinUtils::DwmSetWindowAttributeProc WinUtils::dwmSetWindowAttributePtr = nullptr;
-WinUtils::DwmInvalidateIconicBitmapsProc WinUtils::dwmInvalidateIconicBitmapsPtr = nullptr;
-WinUtils::DwmDefWindowProcProc WinUtils::dwmDwmDefWindowProcPtr = nullptr;
-WinUtils::DwmGetCompositionTimingInfoProc WinUtils::dwmGetCompositionTimingInfoPtr = nullptr;
-WinUtils::DwmFlushProc WinUtils::dwmFlushProcPtr = nullptr;
-
// Prefix for path used by NT calls.
const wchar_t kNTPrefix[] = L"\\??\\";
const size_t kNTPrefixLen = ArrayLength(kNTPrefix) - 1;
@@ -462,23 +446,6 @@ static NtTestAlertPtr sNtTestAlert = nullptr;
void
WinUtils::Initialize()
{
- if (!sDwmDll) {
- sDwmDll = ::LoadLibraryW(kDwmLibraryName);
-
- if (sDwmDll) {
- dwmExtendFrameIntoClientAreaPtr = (DwmExtendFrameIntoClientAreaProc)::GetProcAddress(sDwmDll, "DwmExtendFrameIntoClientArea");
- dwmIsCompositionEnabledPtr = (DwmIsCompositionEnabledProc)::GetProcAddress(sDwmDll, "DwmIsCompositionEnabled");
- dwmSetIconicThumbnailPtr = (DwmSetIconicThumbnailProc)::GetProcAddress(sDwmDll, "DwmSetIconicThumbnail");
- dwmSetIconicLivePreviewBitmapPtr = (DwmSetIconicLivePreviewBitmapProc)::GetProcAddress(sDwmDll, "DwmSetIconicLivePreviewBitmap");
- dwmGetWindowAttributePtr = (DwmGetWindowAttributeProc)::GetProcAddress(sDwmDll, "DwmGetWindowAttribute");
- dwmSetWindowAttributePtr = (DwmSetWindowAttributeProc)::GetProcAddress(sDwmDll, "DwmSetWindowAttribute");
- dwmInvalidateIconicBitmapsPtr = (DwmInvalidateIconicBitmapsProc)::GetProcAddress(sDwmDll, "DwmInvalidateIconicBitmaps");
- dwmDwmDefWindowProcPtr = (DwmDefWindowProcProc)::GetProcAddress(sDwmDll, "DwmDefWindowProc");
- dwmGetCompositionTimingInfoPtr = (DwmGetCompositionTimingInfoProc)::GetProcAddress(sDwmDll, "DwmGetCompositionTimingInfo");
- dwmFlushProcPtr = (DwmFlushProc)::GetProcAddress(sDwmDll, "DwmFlush");
- }
- }
-
if (IsWin10OrLater()) {
HMODULE user32Dll = ::GetModuleHandleW(L"user32");
if (user32Dll) {
@@ -1179,32 +1146,6 @@ WinUtils::SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc,
return sCreateItemFromParsingName(pszPath, pbc, riid, ppv);
}
-/* static */
-HRESULT
-WinUtils::SHGetKnownFolderPath(REFKNOWNFOLDERID rfid,
- DWORD dwFlags,
- HANDLE hToken,
- PWSTR *ppszPath)
-{
- if (sGetKnownFolderPath) {
- return sGetKnownFolderPath(rfid, dwFlags, hToken, ppszPath);
- }
-
- if (!sShellDll) {
- sShellDll = ::LoadLibraryW(kShellLibraryName);
- if (!sShellDll) {
- return false;
- }
- }
-
- sGetKnownFolderPath = (SHGetKnownFolderPathPtr)
- GetProcAddress(sShellDll, "SHGetKnownFolderPath");
- if (!sGetKnownFolderPath)
- return E_FAIL;
-
- return sGetKnownFolderPath(rfid, dwFlags, hToken, ppszPath);
-}
-
static BOOL
WINAPI EnumFirstChild(HWND hwnd, LPARAM lParam)
{