[PATCH 2/2] mscoree: add stub for CorGetSvc to hint user at broken .Net installation, and show some tips to correct this.
Austin English
austinenglish at gmail.com
Mon Jul 9 15:57:14 CDT 2018
On Mon, Jul 9, 2018 at 3:48 PM, Louis Lenders
<xerox.xerox2000x at gmail.com> wrote:
> See bug https://www.winehq.org/pipermail/wine-bugs/2018-July/494631.html.
> This patch shows users some hints to fix broken .Net installation, instead of crashing and leaving user in the dark
>
> Signed-off-by: Louis Lenders <xerox.xerox2000x at gmail.com>
> ---
> dlls/mscoree/mscoree.spec | 2 +-
> dlls/mscoree/mscoree_main.c | 22 ++++++++++++++++++++++
> dlls/mscoree/tests/mscoree.c | 10 +++++++++-
> 3 files changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/mscoree/mscoree.spec b/dlls/mscoree/mscoree.spec
> index ec4668bc3c..7fa68bf8b1 100644
> --- a/dlls/mscoree/mscoree.spec
> +++ b/dlls/mscoree/mscoree.spec
> @@ -24,7 +24,7 @@
> @ stdcall CorBindToRuntimeHost(wstr wstr wstr ptr long ptr ptr ptr)
> @ stub CorDllMainWorker
> @ stdcall CorExitProcess(long)
> -@ stub CorGetSvc
> +@ stdcall CorGetSvc(ptr)
> @ stdcall CorIsLatestSvc(ptr ptr)
> @ stub CorMarkThreadInThreadPool
> @ stub CorTickleSvc
> diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c
> index 519f918223..29fe23bf7c 100644
> --- a/dlls/mscoree/mscoree_main.c
> +++ b/dlls/mscoree/mscoree_main.c
> @@ -315,6 +315,28 @@ HRESULT WINAPI CorIsLatestSvc(int *unk1, int *unk2)
> return S_OK;
> }
>
> +HRESULT WINAPI CorGetSvc(IUnknown **pIUnknown)
> +{
> + typedef INT (WINAPI *MessageBoxA)(HWND,LPCSTR,LPCSTR,UINT);
> + HMODULE hUser32 = LoadLibraryA("user32");
> + MessageBoxA pMessageBoxA = (void *)GetProcAddress(hUser32, "MessageBoxA");
> +
> + FIXME("%p stub\n",pIUnknown);
> + if (pMessageBoxA)
> + {
> + pMessageBoxA(NULL,
> + "Something is broken in your .Net installation.\n"
> + "Apparently you try to run an app with MS .NET Framework but have Wine-Mono installed. "
This should be 'tried' instead of 'try'. Also, did you mean to leave a
trailing space?
More information about the wine-devel
mailing list