mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
DragAndDrop: Fix drag and drop in windows optimised builds
In very optimised builds, SHCore.dll may not be automatically loaded into the address space of the calling executable. In these cases, the call to `GetModuleHandle` will fail. Adding the call to LoadLibrary ensures that the dll is loaded into the program's address space, which will allow the call to GetModuleHandle to succeed.
This commit is contained in:
parent
e988c4c671
commit
88285acae1
1 changed files with 3 additions and 1 deletions
|
|
@ -362,7 +362,9 @@ static void setDPIAwareness()
|
|||
if (! JUCEApplicationBase::isStandaloneApp())
|
||||
return;
|
||||
|
||||
HMODULE shcoreModule = GetModuleHandleA ("SHCore.dll");
|
||||
const auto shcore = "SHCore.dll";
|
||||
LoadLibraryA (shcore);
|
||||
const auto shcoreModule = GetModuleHandleA (shcore);
|
||||
|
||||
if (shcoreModule != nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue