Author: mjansen
Date: Fri Jul 14 19:29:34 2017
New Revision: 75340
URL:
http://svn.reactos.org/svn/reactos?rev=75340&view=rev
Log:
[APPCOMPAT] Various fixes.
- Simplify shimdbg output as suggested by Thomas
- Simplify media/sdb/sysmain.xml
- Fix some warnings + a debug print
Modified:
trunk/reactos/dll/appcompat/apphelp/hsdb.c
trunk/reactos/dll/appcompat/apphelp/layer.c
trunk/reactos/media/sdb/sysmain.xml
trunk/rosapps/applications/devutils/shimdbg/shimdbg.c
Modified: trunk/reactos/dll/appcompat/apphelp/hsdb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/apphelp/hsdb…
==============================================================================
--- trunk/reactos/dll/appcompat/apphelp/hsdb.c [iso-8859-1] (original)
+++ trunk/reactos/dll/appcompat/apphelp/hsdb.c [iso-8859-1] Fri Jul 14 19:29:34 2017
@@ -577,7 +577,7 @@
if (!default_dir)
{
- WCHAR* tmp = NULL;
+ WCHAR* tmp;
UINT len = GetSystemWindowsDirectoryW(NULL, 0) + lstrlenW(szAppPatch);
tmp = SdbAlloc((len + 1)* sizeof(WCHAR));
if (tmp)
@@ -706,7 +706,7 @@
pData->unknown = 0;
pData->szLayer[0] = UNICODE_NULL; /* TODO */
- SHIM_INFO("\ndwFlags 0x%x\ndwMagic 0x%x\ntrExe 0x%x\ntrLayer
0x%x",
+ SHIM_INFO("\ndwFlags 0x%x\ndwMagic 0x%x\ntrExe 0x%x\ntrLayer
0x%x\n",
pData->Query.dwFlags, pData->dwMagic, pData->Query.atrExes[0],
pData->Query.atrLayers[0]);
/* Database List */
Modified: trunk/reactos/dll/appcompat/apphelp/layer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/apphelp/laye…
==============================================================================
--- trunk/reactos/dll/appcompat/apphelp/layer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/appcompat/apphelp/layer.c [iso-8859-1] Fri Jul 14 19:29:34 2017
@@ -159,7 +159,7 @@
FindClose(FindHandle);
SdbpResizeTempStr(LongPath, (LongPath->Str.Length >> 1) + 20);
StringCbPrintfW(LongPath->Str.Buffer, LongPath->Str.MaximumLength,
SIGN_MEDIA_FMT, SignMedia, Scratch.Str.Buffer + 3);
- LongPath->Str.Length = wcslen(LongPath->Str.Buffer) * sizeof(WCHAR);
+ LongPath->Str.Length = (USHORT)wcslen(LongPath->Str.Buffer) *
sizeof(WCHAR);
SdbpFreeTempStr(&Scratch);
return TRUE;
}
@@ -217,7 +217,7 @@
return Status;
}
}
- FullPath->MaximumLength = BasePath.Length + (wcslen(LayersKey) + 1) *
sizeof(WCHAR);
+ FullPath->MaximumLength = (USHORT)(BasePath.Length + (wcslen(LayersKey) + 1) *
sizeof(WCHAR));
FullPath->Buffer = SdbAlloc(FullPath->MaximumLength);
FullPath->Length = 0;
RtlAppendUnicodeStringToString(FullPath, &BasePath);
Modified: trunk/reactos/media/sdb/sysmain.xml
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/sdb/sysmain.xml?rev=…
==============================================================================
--- trunk/reactos/media/sdb/sysmain.xml [iso-8859-1] (original)
+++ trunk/reactos/media/sdb/sysmain.xml [iso-8859-1] Fri Jul 14 19:29:34 2017
@@ -7,224 +7,183 @@
<!-- Version lie shims -->
- <SHIM>
- <NAME>Win95VersionLie</NAME>
+ <SHIM NAME="Win95VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win98VersionLie</NAME>
+ <SHIM NAME="Win98VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>WinNT4SP5VersionLie</NAME>
+ <SHIM NAME="WinNT4SP5VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2000VersionLie</NAME>
+ <SHIM NAME="Win2000VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2000SP1VersionLie</NAME>
+ <SHIM NAME="Win2000SP1VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2000SP2VersionLie</NAME>
+ <SHIM NAME="Win2000SP2VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2000SP3VersionLie</NAME>
+ <SHIM NAME="Win2000SP3VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>WinXPVersionLie</NAME>
+ <SHIM NAME="WinXPVersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>WinXPSP1VersionLie</NAME>
+ <SHIM NAME="WinXPSP1VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>WinXPSP2VersionLie</NAME>
+ <SHIM NAME="WinXPSP2VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>WinXPSP3VersionLie</NAME>
+ <SHIM NAME="WinXPSP3VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2k3RTMVersionLie</NAME>
+ <SHIM NAME="Win2k3RTMVersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2k3SP1VersionLie</NAME>
+ <SHIM NAME="Win2k3SP1VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win2k3SP2VersionLie</NAME>
+ <SHIM NAME="Win2k3SP2VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>VistaRTMVersionLie</NAME>
+ <SHIM NAME="VistaRTMVersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>VistaSP1VersionLie</NAME>
+ <SHIM NAME="VistaSP1VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>VistaSP2VersionLie</NAME>
+ <SHIM NAME="VistaSP2VersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Win7RTMVersionLie</NAME>
+ <SHIM NAME="Win7RTMVersionLie">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<!-- Display mode shims -->
- <SHIM>
- <NAME>Force640x480</NAME>
+ <SHIM NAME="Force640x480">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
- <SHIM>
- <NAME>Force8BitColor</NAME>
+ <SHIM NAME="Force8BitColor">
<DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
<!-- misc shims -->
- <SHIM>
- <NAME>DisableThemes</NAME>
+ <SHIM NAME="DisableThemes">
<DLLFILE>acgenral.dll</DLLFILE>
+ </SHIM>
+
+ <SHIM NAME="HideShimEnv">
+ <DLLFILE>aclayers.dll</DLLFILE>
</SHIM>
</LIBRARY>
<!-- Backwards compatibility layers, incomplete! -->
- <LAYER>
- <NAME>WIN95</NAME>
+ <LAYER NAME="WIN95">
<SHIM_REF NAME="Win95VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WIN98</NAME>
+ <LAYER NAME="WIN98">
<SHIM_REF NAME="Win98VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>NT4SP5</NAME>
+ <LAYER NAME="NT4SP5">
<SHIM_REF NAME="WinNT4SP5VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WIN2000</NAME>
+ <LAYER NAME="WIN2000">
<SHIM_REF NAME="Win2000VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WIN2000SP1</NAME>
+ <LAYER NAME="WIN2000SP1">
<SHIM_REF NAME="Win2000SP1VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WIN2000SP2</NAME>
+ <LAYER NAME="WIN2000SP2">
<SHIM_REF NAME="Win2000SP2VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WIN2000SP3</NAME>
+ <LAYER NAME="WIN2000SP3">
<SHIM_REF NAME="Win2000SP3VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINXP</NAME>
+ <LAYER NAME="WINXP">
<SHIM_REF NAME="WinXPVersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINXPSP1</NAME>
+ <LAYER NAME="WINXPSP1">
<SHIM_REF NAME="WinXPSP1VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINXPSP2</NAME>
+ <LAYER NAME="WINXPSP2">
<SHIM_REF NAME="WinXPSP2VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINXPSP3</NAME>
+ <LAYER NAME="WINXPSP3">
<SHIM_REF NAME="WinXPSP3VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINSRV03RTM</NAME>
+ <LAYER NAME="WINSRV03RTM">
<SHIM_REF NAME="Win2k3RTMVersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINSRV03SP1</NAME>
+ <LAYER NAME="WINSRV03SP1">
<SHIM_REF NAME="Win2k3SP1VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINSRV03SP2</NAME>
+ <LAYER NAME="WINSRV03SP2">
<SHIM_REF NAME="Win2k3SP2VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>VISTARTM</NAME>
+ <LAYER NAME="VISTARTM">
<SHIM_REF NAME="VistaRTMVersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>VISTASP1</NAME>
+ <LAYER NAME="VISTASP1">
<SHIM_REF NAME="VistaSP1VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>VISTASP2</NAME>
+ <LAYER NAME="VISTASP2">
<SHIM_REF NAME="VistaSP2VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINSRV08</NAME>
+ <LAYER NAME="WINSRV08">
<SHIM_REF NAME="VistaRTMVersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINSRV08SP1</NAME>
+ <LAYER NAME="WINSRV08SP1">
<SHIM_REF NAME="VistaSP1VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WINSRV08SP2</NAME>
+ <LAYER NAME="WINSRV08SP2">
<SHIM_REF NAME="VistaSP2VersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
- <LAYER>
- <NAME>WIN7RTM</NAME>
+ <LAYER NAME="WIN7RTM">
<SHIM_REF NAME="Win7RTMVersionLie" />
<!-- TODO: Add more fixes! -->
</LAYER>
<!-- Display mode layers -->
- <LAYER>
- <NAME>256Color</NAME>
+ <LAYER NAME="256Color">
<SHIM_REF NAME="DisableThemes" />
<SHIM_REF NAME="Force8BitColor" />
</LAYER>
- <LAYER>
- <NAME>640X480</NAME>
+ <LAYER NAME="640X480">
<SHIM_REF NAME="Force640x480" />
</LAYER>
<!-- misc layers -->
- <LAYER>
- <NAME>DisableThemes</NAME>
+ <LAYER NAME="DisableThemes">
<SHIM_REF NAME="DisableThemes" />
</LAYER>
Modified: trunk/rosapps/applications/devutils/shimdbg/shimdbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/shim…
==============================================================================
--- trunk/rosapps/applications/devutils/shimdbg/shimdbg.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/devutils/shimdbg/shimdbg.c [iso-8859-1] Fri Jul 14 19:29:34
2017
@@ -10,23 +10,16 @@
#include <ctype.h>
#include <ntndk.h>
-void __stdcall OutputDebugStringA(PCSTR);
+NTSYSAPI ULONG NTAPI vDbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ PCCH
Format, _In_ va_list ap);
+#define DPFLTR_ERROR_LEVEL 0
void xprintf(const char *fmt, ...)
{
va_list ap;
- int length;
- char *buf;
va_start(ap, fmt);
- length = _vscprintf(fmt, ap);
- buf = malloc(length + 1);
- vsprintf(buf, fmt, ap);
- buf[length] = '\0';
- va_end(ap);
-
- fputs(buf, stdout);
- OutputDebugStringA(buf);
+ vprintf(fmt, ap);
+ vDbgPrintEx(-1, DPFLTR_ERROR_LEVEL, fmt, ap);
}