diff --git a/wine/wine.vcxproj b/wine/wine.vcxproj
index 91239dfd432..0ee45a32174 100644
--- a/wine/wine.vcxproj
+++ b/wine/wine.vcxproj
@@ -77,7 +77,7 @@
true
wine.def
true
- %(AdditionalDependencies)
+ shlwapi.lib;%(AdditionalDependencies)
@@ -96,6 +96,7 @@
true
true
wine.def
+ shlwapi.lib;%(AdditionalDependencies)
diff --git a/wine/wrapper.c b/wine/wrapper.c
index 1676fb6857e..38c5b342f5f 100644
--- a/wine/wrapper.c
+++ b/wine/wrapper.c
@@ -1,6 +1,20 @@
#include
+#include
//PROGMAN.EXEなどでCOMMDLGが読み込まれなかったので修正
HMODULE LoadLibraryAWrapper(const char *name)
{
- return LoadLibraryA(name);
+ HMODULE m = LoadLibraryA(name);
+ if (m)
+ return m;
+ else
+ {
+ char buf[MAX_PATH];
+ char buf2[MAX_PATH];
+ GetModuleFileNameA(GetModuleHandleA("libwine.dll"), buf, sizeof(buf));
+ *PathFindFileNameA(buf) = '\0';
+ PathCombineA(buf2, buf, name);
+
+ m = LoadLibraryA(buf2);
+ }
+ return m;
}