Signed-off-by: Esme Povirk esme@codeweavers.com --- include/Makefile.in | 1 + include/corsym.idl | 97 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 include/corsym.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 7fcf5f0ba7b..2f1e4767848 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -89,6 +89,7 @@ SOURCES = \ cordebug.idl \ corerror.h \ corhdr.h \ + corsym.idl \ cpl.h \ crtrow.idl \ cryptdlg.h \ diff --git a/include/corsym.idl b/include/corsym.idl new file mode 100644 index 00000000000..5faf32c0ddd --- /dev/null +++ b/include/corsym.idl @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2022 Esme Povirk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "objidl.idl"; +import "oaidl.idl"; + +cpp_quote("#if 0") +/* defined in corhdr.h */ +typedef UINT32 mdToken; +typedef mdToken mdMethodDef; +typedef mdToken mdTypeDef; +/* defined in winnt.h */ +typedef SIZE_T IMAGE_DEBUG_DIRECTORY; +cpp_quote("#endif") + +[ + object, + uuid(b01fafeb-c450-3a4d-beec-b4ceec01e006), + pointer_default(unique) +] +interface ISymUnmanagedDocumentWriter : IUnknown +{ + HRESULT SetSource([in] ULONG32 sourceSize, [in, size_is(sourceSize)] BYTE source[]); + HRESULT SetCheckSum([in] GUID algorithmId, + [in] ULONG32 checkSumSize, [in, size_is(checkSumSize)] BYTE checkSum[]); +} + +[ + object, + uuid(ed14aa72-78e2-4884-84e2-334293ae5214), + pointer_default(unique) +] +interface ISymUnmanagedWriter : IUnknown +{ + HRESULT DefineDocument([in] const WCHAR *url, [in] const GUID *language, [in] const GUID *languageVendor, + [in] const GUID *documentType, [out, retval] ISymUnmanagedDocumentWriter** pRetVal); + HRESULT SetUserEntryPoint([in] mdMethodDef entryMethod); + HRESULT OpenMethod([in] mdMethodDef method); + HRESULT CloseMethod(); + HRESULT OpenScope([in] ULONG32 startOffset, [out, retval] ULONG32 *pRetVal); + HRESULT CloseScope([in] ULONG32 endOffset); + HRESULT SetScopeRange([in] ULONG32 scopeID, [in] ULONG32 startOffset, [in] ULONG32 endOffset); + HRESULT DefineLocalVariable([in] const WCHAR *name, [in] ULONG32 attributes, [in] ULONG32 cSig, + [in, size_is(cSig)] unsigned char signature[], [in] ULONG32 addrKind, + [in] ULONG32 addr1, [in] ULONG32 addr2, [in] ULONG32 addr3, + [in] ULONG32 startOffset, [in] ULONG32 endOffset); + HRESULT DefineParameter([in] const WCHAR *name, [in] ULONG32 attributes, [in] ULONG32 sequence, + [in] ULONG32 addrKind, + [in] ULONG32 addr1, [in] ULONG32 addr2, [in] ULONG32 addr3); + HRESULT DefineField([in] mdTypeDef parent, [in] const WCHAR *name, [in] ULONG32 attributes, [in] ULONG32 cSig, + [in, size_is(cSig)] unsigned char signature[], [in] ULONG32 addrKind, + [in] ULONG32 addr1, [in] ULONG32 addr2, [in] ULONG32 addr3); + HRESULT DefineGlobalVariable([in] const WCHAR *name, [in] ULONG32 attributes, [in] ULONG32 cSig, + [in, size_is(cSig)] unsigned char signature[], [in] ULONG32 addrKind, + [in] ULONG32 addr1, [in] ULONG32 addr2, [in] ULONG32 addr3); + HRESULT Close(); + HRESULT SetSymAttributes([in] mdToken parent, [in] const WCHAR *name, + [in] ULONG32 cData, [in, size_is(cData)] unsigned char data[]); + HRESULT OpenNamespace([in] const WCHAR *name); + HRESULT CloseNamespace(); + HRESULT UsingNamespace([in] const WCHAR *fullName); + HRESULT SetMethodSourceRange([in] ISymUnmanagedDocumentWriter *startDoc, ULONG32 startLine, ULONG32 startColumn, + [in] ISymUnmanagedDocumentWriter *endDoc, ULONG32 endLine, ULONG32 endColumn); + HRESULT Initialize([in] IUnknown *emitter, [in] const WCHAR *filename, [in] IStream *pIStream, + [in] BOOL fFullBuild); + HRESULT GetDebugInfo([in, out] IMAGE_DEBUG_DIRECTORY *pIDD, [in] DWORD cData, [out] DWORD *pcData, + [out, size_is(cData), length_is(*pcData)] BYTE data[]); + HRESULT DefineSequencePoints([in] ISymUnmanagedDocumentWriter *document, [in] ULONG32 spCount, + [in, size_is(spCount)] ULONG32 offsets[], [in, size_is(spCount)] ULONG32 lines[], + [in, size_is(spCount)] ULONG32 columns[], [in, size_is(spCount)] ULONG32 endLines[], + [in, size_is(spCount)] ULONG32 endColumns[]); + HRESULT RemapToken([in] mdToken oldToken, [in] mdToken newToken); + HRESULT Initialize2([in] IUnknown *emitter, [in] const WCHAR *tempFilename, [in] IStream *pIStream, + [in] BOOL fFullBuild, [in] const WCHAR *finalFilename); + HRESULT DefineConstant([in] const WCHAR *name, [in] VARIANT value, [in] ULONG32 cSig, + [in, size_is(cSig)] unsigned char signature[]); + HRESULT Abort(); +} + +cpp_quote("DEFINE_GUID(CLSID_CorSymWriter_SxS, 0x0ae2deb0,0xf901,0x478b,0xbb,0x9f,0x88,0x1e,0xe8,0x06,0x67,0x88);") +
Signed-off-by: Esme Povirk esme@codeweavers.com --- configure.ac | 1 + dlls/diasymreader/Makefile.in | 3 +++ dlls/diasymreader/diasymreader.spec | 8 ++++++++ loader/wine.inf.in | 2 ++ 4 files changed, 14 insertions(+) create mode 100644 dlls/diasymreader/Makefile.in create mode 100644 dlls/diasymreader/diasymreader.spec
diff --git a/configure.ac b/configure.ac index 0aad012060e..4396981f69c 100644 --- a/configure.ac +++ b/configure.ac @@ -2738,6 +2738,7 @@ WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc) WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc/tests) WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc6) WINE_CONFIG_MAKEFILE(dlls/dhtmled.ocx) +WINE_CONFIG_MAKEFILE(dlls/diasymreader) WINE_CONFIG_MAKEFILE(dlls/difxapi) WINE_CONFIG_MAKEFILE(dlls/dinput) WINE_CONFIG_MAKEFILE(dlls/dinput/tests) diff --git a/dlls/diasymreader/Makefile.in b/dlls/diasymreader/Makefile.in new file mode 100644 index 00000000000..6cc5541adff --- /dev/null +++ b/dlls/diasymreader/Makefile.in @@ -0,0 +1,3 @@ +MODULE = diasymreader.dll + +EXTRADLLFLAGS = -Wb,--prefer-native diff --git a/dlls/diasymreader/diasymreader.spec b/dlls/diasymreader/diasymreader.spec new file mode 100644 index 00000000000..9277fb1bcd9 --- /dev/null +++ b/dlls/diasymreader/diasymreader.spec @@ -0,0 +1,8 @@ +@ stub CreateNGenPdbWriter +@ stub DllCanUnloadNow +@ stub DllGetClassObject +@ stub DllGetClassObjectInternal +@ stub DllRegisterServer +@ stub DllUnregisterServer +@ stub VSDllRegisterServer +@ stub VSDllUnregisterServer diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 2fd4fbd22ea..077338bc32e 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2635,6 +2635,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,aspnet_regiis.exe,- 11,,ngen.exe,- 11,,fusion.dll,- +11,,diasymreader.dll,- 11,,mscorwks.dll,- 11,,regsvcs.exe,- 11,,regasm.exe,- @@ -2689,6 +2690,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,aspnet_regiis.exe,- 11,,ngen.exe,- 11,,fusion.dll,- +11,,diasymreader.dll,- 11,,mscorwks.dll,- 11,,regsvcs.exe,- 11,,regasm.exe,-
Signed-off-by: Esme Povirk esme@codeweavers.com --- I think RGS registration is required for this because the way it goes through mscoree is unusual. A later patch will add support for this kind of COM registration to mscoree.
dlls/diasymreader/Makefile.in | 5 ++++ dlls/diasymreader/diasymreader.rc | 23 +++++++++++++++ dlls/diasymreader/diasymreader.rgs | 23 +++++++++++++++ dlls/diasymreader/diasymreader.spec | 6 ++-- dlls/diasymreader/main.c | 46 +++++++++++++++++++++++++++++ 5 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 dlls/diasymreader/diasymreader.rc create mode 100644 dlls/diasymreader/diasymreader.rgs create mode 100644 dlls/diasymreader/main.c
diff --git a/dlls/diasymreader/Makefile.in b/dlls/diasymreader/Makefile.in index 6cc5541adff..2ea95048edd 100644 --- a/dlls/diasymreader/Makefile.in +++ b/dlls/diasymreader/Makefile.in @@ -1,3 +1,8 @@ MODULE = diasymreader.dll +IMPORTS = uuid
EXTRADLLFLAGS = -Wb,--prefer-native + +C_SRCS = main.c + +RC_SRCS = diasymreader.rc diff --git a/dlls/diasymreader/diasymreader.rc b/dlls/diasymreader/diasymreader.rc new file mode 100644 index 00000000000..ce8214c2065 --- /dev/null +++ b/dlls/diasymreader/diasymreader.rc @@ -0,0 +1,23 @@ +/* + * Copyright 2022 Esme Povirk + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <windef.h> + +/* @makedep: diasymreader.rgs */ +2 WINE_REGISTRY diasymreader.rgs + diff --git a/dlls/diasymreader/diasymreader.rgs b/dlls/diasymreader/diasymreader.rgs new file mode 100644 index 00000000000..ea5bf07f370 --- /dev/null +++ b/dlls/diasymreader/diasymreader.rgs @@ -0,0 +1,23 @@ +HKCR +{ + NoRemove CLSID + { + '{0ae2deb0-f901-478b-bb9f-881ee8066788}' + { + InProcServer32 = s 'mscoree.dll' + { + val ThreadingModel = s 'Both' + '4.0.30319' + { + val 'ImplementedInThisVersion' = s '' + } + ProgID = s 'CorSymWriter_SxS' + Server = s 'diasymreader.dll' + } + } + } + 'CorSymWriter_SxS' = s 'NDP SymWriter' + { + CLSID = s '{0ae2deb0-f901-478b-bb9f-881ee8066788}' + } +} diff --git a/dlls/diasymreader/diasymreader.spec b/dlls/diasymreader/diasymreader.spec index 9277fb1bcd9..63644e07fd4 100644 --- a/dlls/diasymreader/diasymreader.spec +++ b/dlls/diasymreader/diasymreader.spec @@ -1,8 +1,8 @@ @ stub CreateNGenPdbWriter @ stub DllCanUnloadNow -@ stub DllGetClassObject +@ stdcall -private DllGetClassObject(ptr ptr ptr) @ stub DllGetClassObjectInternal -@ stub DllRegisterServer -@ stub DllUnregisterServer +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() @ stub VSDllRegisterServer @ stub VSDllUnregisterServer diff --git a/dlls/diasymreader/main.c b/dlls/diasymreader/main.c new file mode 100644 index 00000000000..7c47edb475d --- /dev/null +++ b/dlls/diasymreader/main.c @@ -0,0 +1,46 @@ +/* Copyright (C) 2022 Esme Povirk + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "objbase.h" +#include "ocidl.h" +#include "rpcproxy.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(diasymreader); + +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +{ + FIXME("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +} + +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources(); +} + +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources(); +} +
Signed-off-by: Esme Povirk esme@codeweavers.com --- This version installs and registers diasymreader.dll, so we need to at least have enough of that dll to register it first.
dlls/appwiz.cpl/addons.c | 4 ++-- dlls/mscoree/mscoree_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index b4da6137d72..71919f225c8 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -58,10 +58,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl); #define GECKO_SHA "???" #endif
-#define MONO_VERSION "7.0.0" +#define MONO_VERSION "7.1.1" #if defined(__i386__) || defined(__x86_64__) #define MONO_ARCH "x86" -#define MONO_SHA "b37e6fc9e590e582243dc25d72a5fcc330c3a7970dfdc98a7a81d23845ba8900" +#define MONO_SHA "9dc8e5603b7bc64354eb94ae4ea0f6821424767a3ff44ff0d19e346a490c11ea" #else #define MONO_ARCH "" #define MONO_SHA "???" diff --git a/dlls/mscoree/mscoree_private.h b/dlls/mscoree/mscoree_private.h index 1ef5ac200f3..2e72ea5370b 100644 --- a/dlls/mscoree/mscoree_private.h +++ b/dlls/mscoree/mscoree_private.h @@ -45,7 +45,7 @@ extern HRESULT assembly_get_runtime_version(ASSEMBLY *assembly, LPSTR *version) extern HRESULT assembly_get_vtable_fixups(ASSEMBLY *assembly, VTableFixup **fixups, DWORD *count) DECLSPEC_HIDDEN; extern HRESULT assembly_get_native_entrypoint(ASSEMBLY *assembly, NativeEntryPointFunc *func) DECLSPEC_HIDDEN;
-#define WINE_MONO_VERSION "7.0.0" +#define WINE_MONO_VERSION "7.1.1"
/* Mono embedding */ typedef struct _MonoDomain MonoDomain;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=106366
Your paranoid android.
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
=== debian11 (build log) ===
Task: Could not create the wow32 wineprefix: Failed to disable the crash dialogs: Task: WineTest did not produce the wow32 report
Signed-off-by: Esme Povirk esme@codeweavers.com --- This is just some cleanup before adding support for the new registration type.
dlls/mscoree/corruntimehost.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index ec06717be85..afb5a104ca7 100644 --- a/dlls/mscoree/corruntimehost.c +++ b/dlls/mscoree/corruntimehost.c @@ -1718,13 +1718,9 @@ end:
HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) { - static const WCHAR wszAssembly[] = {'A','s','s','e','m','b','l','y',0}; - static const WCHAR wszCodebase[] = {'C','o','d','e','B','a','s','e',0}; - static const WCHAR wszClass[] = {'C','l','a','s','s',0}; - static const WCHAR wszFileSlash[] = {'f','i','l','e',':','/','/','/',0}; - static const WCHAR wszCLSIDSlash[] = {'C','L','S','I','D','\',0}; - static const WCHAR wszInprocServer32[] = {'\','I','n','p','r','o','c','S','e','r','v','e','r','3','2',0}; - static const WCHAR wszDLL[] = {'.','d','l','l',0}; + static const WCHAR wszFileSlash[] = L"file:///"; + static const WCHAR wszCLSIDSlash[] = L"CLSID\"; + static const WCHAR wszInprocServer32[] = L"\InprocServer32"; WCHAR path[CHARS_IN_GUID + ARRAY_SIZE(wszCLSIDSlash) + ARRAY_SIZE(wszInprocServer32) - 1]; MonoDomain *domain; MonoAssembly *assembly; @@ -1751,7 +1747,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) res = RegOpenKeyExW(HKEY_CLASSES_ROOT, path, 0, KEY_READ, &key); if (res != ERROR_FILE_NOT_FOUND) { - res = RegGetValueW( key, NULL, wszClass, RRF_RT_REG_SZ, NULL, classname, &dwBufLen); + res = RegGetValueW( key, NULL, L"Class", RRF_RT_REG_SZ, NULL, classname, &dwBufLen); if(res != ERROR_SUCCESS) { WARN("Class value cannot be found.\n"); @@ -1762,7 +1758,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) TRACE("classname (%s)\n", debugstr_w(classname));
dwBufLen = MAX_PATH + 8; - res = RegGetValueW( key, NULL, wszCodebase, RRF_RT_REG_SZ, NULL, codebase, &dwBufLen); + res = RegGetValueW( key, NULL, L"CodeBase", RRF_RT_REG_SZ, NULL, codebase, &dwBufLen); if(res == ERROR_SUCCESS) { /* Strip file:/// */ @@ -1797,7 +1793,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) if (res != ERROR_SUCCESS) goto cleanup; dwBufLen = MAX_PATH + 8; - res = RegGetValueW(subkey, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); + res = RegGetValueW(subkey, NULL, L"Assembly", RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); RegCloseKey(subkey); if (res != ERROR_SUCCESS) goto cleanup; @@ -1805,7 +1801,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) else { dwBufLen = MAX_PATH + 8; - res = RegGetValueW(key, NULL, wszAssembly, RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); + res = RegGetValueW(key, NULL, L"Assembly", RRF_RT_REG_SZ, NULL, assemblyname, &dwBufLen); if (res != ERROR_SUCCESS) goto cleanup; } @@ -1830,7 +1826,7 @@ HRESULT create_monodata(REFIID riid, LPVOID *ppObj ) *(ns) = '\0'; lstrcatW(filename, assemblyname); *(ns) = '.'; - lstrcatW(filename, wszDLL); + lstrcatW(filename, L".dll"); } } }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=106367
Your paranoid android.
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out
=== debian11 (build log) ===
Task: Could not create the wow32 wineprefix: Failed to disable the crash dialogs: Task: WineTest did not produce the wow32 report