diff --git a/msil/System.Windows.Forms.dll b/msil/System.Windows.Forms.dll index 6264ce6..0d662e3 100644 Binary files a/msil/System.Windows.Forms.dll and b/msil/System.Windows.Forms.dll differ diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt index 826f68a..5558c74 100644 --- a/wrappers/CMakeLists.txt +++ b/wrappers/CMakeLists.txt @@ -13,6 +13,7 @@ link_libraries(corkdebug) add_library(corkel32 SHARED kernel32.c advapi32.c + comdlg32.c corkel32.def ) diff --git a/wrappers/comdlg32.c b/wrappers/comdlg32.c new file mode 100644 index 0000000..f466caf --- /dev/null +++ b/wrappers/comdlg32.c @@ -0,0 +1,24 @@ +#define _WIN32_WINNT 0x0400 +#include + +#include "debug.h" + +BOOL WINAPI CORKEL32_GetOpenFileNameA(LPOPENFILENAMEA lpOpenFileName) +{ + Trace(TRACE_PASSTHROUGH, "GetOpenFileNameA"); + + // .NET's hook crashes USER.EXE, so we remove it here + lpOpenFileName->lpfnHook = NULL; + + return GetOpenFileNameA(lpOpenFileName); +} + +BOOL WINAPI CORKEL32_GetOpenFileNameW(LPOPENFILENAMEW lpOpenFileName) +{ + Trace(TRACE_PASSTHROUGH, "GetOpenFileNameW"); + + // .NET's hook crashes USER.EXE, so we remove it here + lpOpenFileName->lpfnHook = NULL; + + return GetOpenFileNameW(lpOpenFileName); +} diff --git a/wrappers/corkel32.def b/wrappers/corkel32.def index 7285906..d1e21ce 100644 --- a/wrappers/corkel32.def +++ b/wrappers/corkel32.def @@ -377,3 +377,5 @@ EXPORTS ExpandEnvironmentStringsW=CORKEL32_ExpandEnvironmentStringsW lstrcmpiA=CORKEL32_lstrcmpiA GetConsoleScreenBufferInfo=CORKEL32_GetConsoleScreenBufferInfo + GetOpenFileNameA=CORKEL32_GetOpenFileNameA + GetOpenFileNameW=CORKEL32_GetOpenFileNameW