From b2c60afe53472519900ebf0681d0bc2c78074742 Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 10 Oct 2012 14:24:40 +0100 Subject: [PATCH] VST Host compile fixes for win32. --- .../format_types/juce_VSTPluginFormat.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index d444076e3b..fe937ccb53 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -454,15 +454,14 @@ public: eff->dispatcher (eff, effClose, 0, 0, 0, 0); } - static String getDLLResource (const File& dll, const char* type, int resID) + static String getDLLResource (const File& dllFile, const String& type, int resID) { - DynamicLibrary dll (dll.getFullPathName()); - - HMODULE dllModule = dll.getNativeHandle(); + DynamicLibrary dll (dllFile.getFullPathName()); + HMODULE dllModule = (HMODULE) dll.getNativeHandle(); if (dllModule != INVALID_HANDLE_VALUE) { - HRSRC res = FindResource (dllModule, MAKEINTRESOURCE (resID), type); + HRSRC res = FindResource (dllModule, MAKEINTRESOURCE (resID), type.toWideCharPointer()); if (res != 0) { @@ -470,7 +469,7 @@ public: if (hGlob) { - const char* data = LockResource (hGlob); + const char* data = static_cast (LockResource (hGlob)); return String::fromUTF8 (data, SizeofResource (dllModule, res)); } }