[ros-diffs] [tkreuzer] 75582: [WIN32K] Don't call IntIsFontRenderingEnabled() while holding an exclusive GDI object lock. Should fix GUI hangs.
Author: tkreuzer Date: Thu Aug 17 09:08:57 2017 New Revision: 75582 URL: http://svn.reactos.org/svn/reactos?rev=75582&view=rev Log: [WIN32K] Don't call IntIsFontRenderingEnabled() while holding an exclusive GDI object lock. Should fix GUI hangs. Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype.c?rev=75582&r1=75581&r2=75582&view=diff == --- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Thu Aug 17 09:08:57 2017 @@ -5111,6 +5111,10 @@ return FALSE; } +/* NOTE: This function locks the screen DC, so it must never be called + with a DC already locked */ +Render = IntIsFontRenderingEnabled(); + // TODO: Write test-cases to exactly match real Windows in different // bad parameters (e.g. does Windows check the DC or the RECT first?). dc = DC_LockDc(hDC); @@ -5238,7 +5242,6 @@ EmuBold = (plf->lfWeight >= FW_BOLD && FontGDI->OriginalWeight <= FW_NORMAL); EmuItalic = (plf->lfItalic && !FontGDI->OriginalItalic); -Render = IntIsFontRenderingEnabled(); if (Render) RenderMode = IntGetFontRenderMode(plf); else
[ros-diffs] [tkreuzer] 75583: [WIN32K] Revert an accidental change from r75566 Fixes gdi32_winetest metafile regression
Author: tkreuzer Date: Thu Aug 17 09:39:43 2017 New Revision: 75583 URL: http://svn.reactos.org/svn/reactos?rev=75583&view=rev Log: [WIN32K] Revert an accidental change from r75566 Fixes gdi32_winetest metafile regression Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype.c?rev=75583&r1=75582&r2=75583&view=diff == --- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Thu Aug 17 09:39:43 2017 @@ -5143,7 +5143,7 @@ if (!dc->dclevel.pSurface) { /* Memory DC with no surface selected */ -bResult = FALSE; // TRUE? +bResult = TRUE; goto Cleanup; }
[ros-diffs] [bfreisen] 75584: [PSDK][GDIPLUS] Further work on wrapper classes Pen, Graphics and Brush
Author: bfreisen Date: Thu Aug 17 09:44:57 2017 New Revision: 75584 URL: http://svn.reactos.org/svn/reactos?rev=75584&view=rev Log: [PSDK][GDIPLUS] Further work on wrapper classes Pen, Graphics and Brush Modified: trunk/reactos/sdk/include/psdk/gdiplusbrush.h trunk/reactos/sdk/include/psdk/gdiplusgraphics.h trunk/reactos/sdk/include/psdk/gdipluspen.h Modified: trunk/reactos/sdk/include/psdk/gdiplusbrush.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/gdiplusbrush.h?rev=75584&r1=75583&r2=75584&view=diff == --- trunk/reactos/sdk/include/psdk/gdiplusbrush.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/gdiplusbrush.h [iso-8859-1] Thu Aug 17 09:44:57 2017 @@ -24,6 +24,8 @@ class Brush : public GdiplusBase { public: + friend class Pen; + Brush *Clone(VOID) const { return NULL; @@ -31,12 +33,26 @@ Status GetLastStatus(VOID) { -return NotImplemented; +return status; } BrushType GetType(VOID) { -return BrushTypeSolidColor; +BrushType type; +SetStatus(DllExports::GdipGetBrushType(brush, &type)); +return type; + } + +private: + mutable Status status; + GpBrush *brush; + + Status SetStatus(Status status) const + { +if (status == Ok) + return status; +this->status = status; +return status; } }; Modified: trunk/reactos/sdk/include/psdk/gdiplusgraphics.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/gdiplusgraphics.h?rev=75584&r1=75583&r2=75584&view=diff == --- trunk/reactos/sdk/include/psdk/gdiplusgraphics.h[iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/gdiplusgraphics.h[iso-8859-1] Thu Aug 17 09:44:57 2017 @@ -56,7 +56,7 @@ Status AddMetafileComment(const BYTE *data, UINT sizeData) { -return NotImplemented; +return SetStatus(DllExports::GdipComment(graphics, sizeData, data)); } GraphicsContainer BeginContainer(VOID) @@ -76,57 +76,57 @@ Status Clear(const Color &color) { -return NotImplemented; +return SetStatus(DllExports::GdipGraphicsClear(graphics, color.GetValue())); } Status DrawArc(const Pen *pen, const Rect &rect, REAL startAngle, REAL sweepAngle) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawArcI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); } Status DrawArc(const Pen *pen, const RectF &rect, REAL startAngle, REAL sweepAngle) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawArcI(graphics, pen ? pen->pen : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); } Status DrawArc(const Pen *pen, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawArc(graphics, pen ? pen->pen : NULL, x, y, width, height, startAngle, sweepAngle)); } Status DrawArc(const Pen *pen, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawArcI(graphics, pen ? pen->pen : NULL, x, y, width, height, startAngle, sweepAngle)); } Status DrawBezier(const Pen *pen, const Point &pt1, const Point &pt2, const Point &pt3, const Point &pt4) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawBezierI(graphics, pen ? pen->pen : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y)); } Status DrawBezier(const Pen *pen, const PointF &pt1, const PointF &pt2, const PointF &pt3, const PointF &pt4) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawBezier(graphics, pen ? pen->pen : NULL, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y)); } Status DrawBezier(const Pen *pen, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawBezier(graphics, pen ? pen->pen : NULL, x1, y1, x2, y2, x3, y3, x4, y4)); } Status DrawBezier(const Pen *pen, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawBezierI(graphics, pen ? pen->pen : NULL, x1, y1, x2, y2, x3, y3, x4, y4)); } Status DrawBeziers(const Pen *pen, const Point *points, INT count) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawBeziersI(graphics, pen ? pen->pen : NULL, points, count)); } Status DrawBeziers(const Pen *pen, const PointF *points, INT count) { -return NotImplemented; +return SetStatus(DllExports::GdipDrawBeziers(graphics, pen ? pen->pen : NULL, points, count)); } Status DrawCachedBitmap(CachedBitmap *cb, INT x, INT y) @@ -136,
[ros-diffs] [mjansen] 75585: [ADVAPI32_APITEST] Test unaligned pointers for RegOpenKeyExW.
Author: mjansen Date: Thu Aug 17 10:30:10 2017 New Revision: 75585 URL: http://svn.reactos.org/svn/reactos?rev=75585&view=rev Log: [ADVAPI32_APITEST] Test unaligned pointers for RegOpenKeyExW. Added: trunk/rostests/apitests/advapi32/RegOpenKeyExW.c (with props) Modified: trunk/rostests/apitests/advapi32/CMakeLists.txt trunk/rostests/apitests/advapi32/testlist.c Modified: trunk/rostests/apitests/advapi32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/CMakeLists.txt?rev=75585&r1=75584&r2=75585&view=diff == --- trunk/rostests/apitests/advapi32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/CMakeLists.txt [iso-8859-1] Thu Aug 17 10:30:10 2017 @@ -9,6 +9,7 @@ QueryServiceConfig2.c RegEnumKey.c RegEnumValueW.c +RegOpenKeyExW.c RegQueryInfoKey.c RegQueryValueExW.c RtlEncryptMemory.c Added: trunk/rostests/apitests/advapi32/RegOpenKeyExW.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/RegOpenKeyExW.c?rev=75585 == --- trunk/rostests/apitests/advapi32/RegOpenKeyExW.c(added) +++ trunk/rostests/apitests/advapi32/RegOpenKeyExW.c[iso-8859-1] Thu Aug 17 10:30:10 2017 @@ -0,0 +1,59 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for the RegOpenKeyExW alignment + * PROGRAMMER: Mark Jansen + */ +#include + +#define WIN32_NO_STATUS +#include + +#include +struct Unalignment1 +{ +char dum; +WCHAR buffer[20]; +} Unalignment1; +struct Unalignment2 +{ +char dum; +HKEY hk; +} Unalignment2; +#include + + +#define TEST_STRL".exe" + + +START_TEST(RegOpenKeyExW) +{ +struct Unalignment1 un; +struct Unalignment2 un2; +HKEY hk; +LONG lRes; + +memcpy(un.buffer, TEST_STR, sizeof(TEST_STR)); +un2.hk = 0; + +lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, TEST_STR, 0, KEY_READ, &hk); +ok_int(lRes, ERROR_SUCCESS); +if (lRes) +return; +RegCloseKey(hk); + +ok_hex(((ULONG_PTR)un.buffer) % 2, 1); +lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, un.buffer, 0, KEY_READ, &hk); +ok_int(lRes, ERROR_SUCCESS); +if (!lRes) +RegCloseKey(hk); + +ok_hex(((ULONG_PTR)&un2.hk) % 2, 1); +lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, TEST_STR, 0, KEY_READ, &un2.hk); +ok_int(lRes, ERROR_SUCCESS); +if (!lRes) +{ +hk = un2.hk; +RegCloseKey(hk); +} +} Propchange: trunk/rostests/apitests/advapi32/RegOpenKeyExW.c -- svn:eol-style = native Modified: trunk/rostests/apitests/advapi32/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/testlist.c?rev=75585&r1=75584&r2=75585&view=diff == --- trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] Thu Aug 17 10:30:10 2017 @@ -12,6 +12,7 @@ extern void func_QueryServiceConfig2(void); extern void func_RegEnumKey(void); extern void func_RegEnumValueW(void); +extern void func_RegOpenKeyExW(void); extern void func_RegQueryInfoKey(void); extern void func_RegQueryValueExW(void); extern void func_RtlEncryptMemory(void); @@ -31,6 +32,7 @@ { "RegEnumKey", func_RegEnumKey }, { "RegEnumValueW", func_RegEnumValueW }, { "RegQueryInfoKey", func_RegQueryInfoKey }, +{ "RegOpenKeyExW", func_RegOpenKeyExW }, { "RegQueryValueExW", func_RegQueryValueExW }, { "RtlEncryptMemory", func_RtlEncryptMemory }, { "SaferIdentifyLevel", func_SaferIdentifyLevel },
[ros-diffs] [cfinck] 75586: - Add 0x96 as ISO9660 partition type to ntdddisk.h (from https://en.wikipedia.org/wiki/Partition_type) and detect it using IsRecognizedPartition. - Make our isohybrid creat
Author: cfinck Date: Thu Aug 17 11:03:40 2017 New Revision: 75586 URL: http://svn.reactos.org/svn/reactos?rev=75586&view=rev Log: - Add 0x96 as ISO9660 partition type to ntdddisk.h (from https://en.wikipedia.org/wiki/Partition_type) and detect it using IsRecognizedPartition. - Make our isohybrid create an MBR with partition type 0x96. This properly assigns a drive letter to the Live-CD and lets me boot into desktop using "qemu -hda livecd.iso". Fixes CORE-13184 Modified: trunk/reactos/boot/CMakeLists.txt trunk/reactos/sdk/include/psdk/ntdddisk.h Modified: trunk/reactos/boot/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/CMakeLists.txt?rev=75586&r1=75585&r2=75586&view=diff == --- trunk/reactos/boot/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/CMakeLists.txt [iso-8859-1] Thu Aug 17 11:03:40 2017 @@ -68,7 +68,7 @@ -eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst -COMMAND native-isohybrid -b ${_isombr_file} ${REACTOS_BINARY_DIR}/bootcd.iso +COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/bootcd.iso DEPENDS isombr native-isohybrid native-mkisofs VERBATIM) @@ -83,7 +83,7 @@ -eltorito-boot loader/isobtrt.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.lst -COMMAND native-isohybrid -b ${_isombr_file} ${REACTOS_BINARY_DIR}/bootcdregtest.iso +COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/bootcdregtest.iso DEPENDS isombr native-isohybrid native-mkisofs VERBATIM) @@ -126,7 +126,7 @@ -eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/livecd.lst -COMMAND native-isohybrid -b ${_isombr_file} ${REACTOS_BINARY_DIR}/livecd.iso +COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/livecd.iso DEPENDS isombr native-isohybrid native-mkisofs VERBATIM) @@ -169,7 +169,7 @@ -eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 -eltorito-alt-boot -eltorito-platform efi -eltorito-boot loader/efisys.bin -no-emul-boot -hide boot.catalog -sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort -duplicates-once -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/hybridcd.lst -COMMAND native-isohybrid -b ${_isombr_file} ${REACTOS_BINARY_DIR}/hybridcd.iso +COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/hybridcd.iso DEPENDS bootcd livecd VERBATIM) Modified: trunk/reactos/sdk/include/psdk/ntdddisk.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/ntdddisk.h?rev=75586&r1=75585&r2=75586&view=diff == --- trunk/reactos/sdk/include/psdk/ntdddisk.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/ntdddisk.h [iso-8859-1] Thu Aug 17 11:03:40 2017 @@ -223,6 +223,7 @@ #ifdef __REACTOS__ #define PARTITION_OLD_LINUX 0x43 #define PARTITION_LINUX 0x83 +#define PARTITION_ISO9660 0x96 #define PARTITION_FREEBSD 0xA5 #define PARTITION_OPENBSD 0xA6 #define PARTITION_NETBSD 0xA9 @@ -253,6 +254,7 @@ ((PartitionType) == PARTITION_XINT13) || \ ((PartitionType) == PARTITION_LINUX) || \ ((PartitionType) == PARTITION_OLD_LINUX) || \ +((PartitionType) == PARTITION_ISO9660) || \ ((PartitionType) == PARTITION_FREEBSD) || \ ((PartitionType) == PARTITION_OPENBSD) || \ ((PartitionType) == PARTITION_NETBSD))
[ros-diffs] [mjansen] 75587: [ADVAPI32_APITEST] Addendum to 75585, use void pointers to work around gcc ignoring pshpack1.
Author: mjansen Date: Thu Aug 17 11:06:46 2017 New Revision: 75587 URL: http://svn.reactos.org/svn/reactos?rev=75587&view=rev Log: [ADVAPI32_APITEST] Addendum to 75585, use void pointers to work around gcc ignoring pshpack1. Modified: trunk/rostests/apitests/advapi32/RegOpenKeyExW.c Modified: trunk/rostests/apitests/advapi32/RegOpenKeyExW.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/RegOpenKeyExW.c?rev=75587&r1=75586&r2=75587&view=diff == --- trunk/rostests/apitests/advapi32/RegOpenKeyExW.c[iso-8859-1] (original) +++ trunk/rostests/apitests/advapi32/RegOpenKeyExW.c[iso-8859-1] Thu Aug 17 11:06:46 2017 @@ -2,25 +2,12 @@ * PROJECT: ReactOS api tests * LICENSE: GPLv2+ - See COPYING in the top level directory * PURPOSE: Test for the RegOpenKeyExW alignment - * PROGRAMMER: Mark Jansen + * PROGRAMMER: Mark Jansen (mark.jan...@reactos.org) */ #include #define WIN32_NO_STATUS #include - -#include -struct Unalignment1 -{ -char dum; -WCHAR buffer[20]; -} Unalignment1; -struct Unalignment2 -{ -char dum; -HKEY hk; -} Unalignment2; -#include #define TEST_STRL".exe" @@ -28,13 +15,14 @@ START_TEST(RegOpenKeyExW) { -struct Unalignment1 un; -struct Unalignment2 un2; +char GccShouldNotAlignThis[20 * 2]; +char GccShouldNotAlignThis2[20]; +PVOID Alias = GccShouldNotAlignThis + 1; +PVOID UnalignedKey = GccShouldNotAlignThis2 + 1; HKEY hk; LONG lRes; -memcpy(un.buffer, TEST_STR, sizeof(TEST_STR)); -un2.hk = 0; +memcpy(Alias, TEST_STR, sizeof(TEST_STR)); lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, TEST_STR, 0, KEY_READ, &hk); ok_int(lRes, ERROR_SUCCESS); @@ -42,18 +30,17 @@ return; RegCloseKey(hk); -ok_hex(((ULONG_PTR)un.buffer) % 2, 1); -lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, un.buffer, 0, KEY_READ, &hk); +ok_hex(((ULONG_PTR)Alias) % 2, 1); +lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, Alias, 0, KEY_READ, &hk); ok_int(lRes, ERROR_SUCCESS); if (!lRes) RegCloseKey(hk); -ok_hex(((ULONG_PTR)&un2.hk) % 2, 1); -lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, TEST_STR, 0, KEY_READ, &un2.hk); +ok_hex(((ULONG_PTR)UnalignedKey) % 2, 1); +lRes = RegOpenKeyExW(HKEY_CLASSES_ROOT, TEST_STR, 0, KEY_READ, UnalignedKey); ok_int(lRes, ERROR_SUCCESS); if (!lRes) { -hk = un2.hk; -RegCloseKey(hk); +RegCloseKey(*(HKEY*)(UnalignedKey)); } }
[ros-diffs] [mjansen] 75588: [NTDLL_APITEST] Test unaligned pointers for NtOpenKey CORE-13689
Author: mjansen Date: Thu Aug 17 11:42:13 2017 New Revision: 75588 URL: http://svn.reactos.org/svn/reactos?rev=75588&view=rev Log: [NTDLL_APITEST] Test unaligned pointers for NtOpenKey CORE-13689 Added: trunk/rostests/apitests/ntdll/NtOpenKey.c (with props) Modified: trunk/rostests/apitests/ntdll/CMakeLists.txt trunk/rostests/apitests/ntdll/testlist.c Modified: trunk/rostests/apitests/ntdll/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/CMakeLists.txt?rev=75588&r1=75587&r2=75588&view=diff == --- trunk/rostests/apitests/ntdll/CMakeLists.txt[iso-8859-1] (original) +++ trunk/rostests/apitests/ntdll/CMakeLists.txt[iso-8859-1] Thu Aug 17 11:42:13 2017 @@ -13,6 +13,7 @@ NtLoadUnloadKey.c NtMapViewOfSection.c NtMutant.c +NtOpenKey.c NtOpenProcessToken.c NtOpenThreadToken.c NtProtectVirtualMemory.c Added: trunk/rostests/apitests/ntdll/NtOpenKey.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/NtOpenKey.c?rev=75588 == --- trunk/rostests/apitests/ntdll/NtOpenKey.c (added) +++ trunk/rostests/apitests/ntdll/NtOpenKey.c [iso-8859-1] Thu Aug 17 11:42:13 2017 @@ -0,0 +1,58 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for NtOpenKey data alignment + * PROGRAMMER: Mark Jansen (mark.jan...@reactos.org) + */ + +#include + +#include + + +#define TEST_STRL"\\Registry\\Machine\\SOFTWARE" + + + +START_TEST(NtOpenKey) +{ +OBJECT_ATTRIBUTES Object; +UNICODE_STRING String; +char GccShouldNotAlignThis[40 * 2]; +char GccShouldNotAlignThis2[20]; +PVOID Alias = GccShouldNotAlignThis + 1; +PVOID UnalignedKey = GccShouldNotAlignThis2 + 1; + +HANDLE KeyHandle; +NTSTATUS Status; + +memcpy(Alias, TEST_STR, sizeof(TEST_STR)); + + +RtlInitUnicodeString(&String, TEST_STR); +InitializeObjectAttributes(&Object, &String, OBJ_CASE_INSENSITIVE, NULL, NULL); + +Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &Object); +ok_ntstatus(Status, STATUS_SUCCESS); + +if (!NT_SUCCESS(Status)) +return; + +NtClose(KeyHandle); + +String.Buffer = Alias; +ok_hex(((ULONG_PTR)String.Buffer) % 2, 1); +Status = NtOpenKey(&KeyHandle, KEY_QUERY_VALUE, &Object); +ok_ntstatus(Status, STATUS_DATATYPE_MISALIGNMENT); // FIXME: Later windows versions succeed here. +if (NT_SUCCESS(Status)) +NtClose(KeyHandle); + +RtlInitUnicodeString(&String, TEST_STR); +ok_hex(((ULONG_PTR)UnalignedKey) % 2, 1); +Status = NtOpenKey(UnalignedKey, KEY_QUERY_VALUE, &Object); +ok_ntstatus(Status, STATUS_SUCCESS); +if (NT_SUCCESS(Status)) +{ +NtClose(*(HANDLE*)(UnalignedKey)); +} +} Propchange: trunk/rostests/apitests/ntdll/NtOpenKey.c -- svn:eol-style = native Modified: trunk/rostests/apitests/ntdll/testlist.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/testlist.c?rev=75588&r1=75587&r2=75588&view=diff == --- trunk/rostests/apitests/ntdll/testlist.c[iso-8859-1] (original) +++ trunk/rostests/apitests/ntdll/testlist.c[iso-8859-1] Thu Aug 17 11:42:13 2017 @@ -16,6 +16,7 @@ extern void func_NtLoadUnloadKey(void); extern void func_NtMapViewOfSection(void); extern void func_NtMutant(void); +extern void func_NtOpenKey(void); extern void func_NtOpenProcessToken(void); extern void func_NtOpenThreadToken(void); extern void func_NtProtectVirtualMemory(void); @@ -72,6 +73,7 @@ { "NtLoadUnloadKey",func_NtLoadUnloadKey }, { "NtMapViewOfSection", func_NtMapViewOfSection }, { "NtMutant", func_NtMutant }, +{ "NtOpenKey", func_NtOpenKey }, { "NtOpenProcessToken", func_NtOpenProcessToken }, { "NtOpenThreadToken", func_NtOpenThreadToken }, { "NtProtectVirtualMemory", func_NtProtectVirtualMemory },
[ros-diffs] [ekohl] 75589: [ADVAPI32] RegQueryInfoKey: Initializing *lpcbSecurityDescriptor before calling NtQueryKey fixes the remaining api tests.
Author: ekohl Date: Thu Aug 17 12:11:10 2017 New Revision: 75589 URL: http://svn.reactos.org/svn/reactos?rev=75589&view=rev Log: [ADVAPI32] RegQueryInfoKey: Initializing *lpcbSecurityDescriptor before calling NtQueryKey fixes the remaining api tests. Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg.c?rev=75589&r1=75588&r2=75589&view=diff == --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Thu Aug 17 12:11:10 2017 @@ -3729,6 +3729,9 @@ FullInfo = &FullInfoBuffer; } +if (lpcbSecurityDescriptor != NULL) +*lpcbSecurityDescriptor = 0; + Status = NtQueryKey(KeyHandle, KeyFullInformation, FullInfo, @@ -3786,10 +3789,7 @@ NULL, 0, lpcbSecurityDescriptor); -if (Status != STATUS_BUFFER_TOO_SMALL) -{ -*lpcbSecurityDescriptor = 0; -} +TRACE("NtQuerySecurityObject() returned status 0x%X\n", Status); } if (lpftLastWriteTime != NULL)
[ros-diffs] [cfinck] 75590: [FORMATTING] Convert all tabs to spaces in ntdddisk.h
Author: cfinck Date: Thu Aug 17 12:18:28 2017 New Revision: 75590 URL: http://svn.reactos.org/svn/reactos?rev=75590&view=rev Log: [FORMATTING] Convert all tabs to spaces in ntdddisk.h Modified: trunk/reactos/sdk/include/psdk/ntdddisk.h Modified: trunk/reactos/sdk/include/psdk/ntdddisk.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/ntdddisk.h?rev=75590&r1=75589&r2=75590&view=diff == --- trunk/reactos/sdk/include/psdk/ntdddisk.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/ntdddisk.h [iso-8859-1] Thu Aug 17 12:18:28 2017 @@ -239,40 +239,40 @@ #ifdef __REACTOS__ #define IsRecognizedPartition(PartitionType) ( \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \ - ((PartitionType) == PARTITION_FAT_12) || \ - ((PartitionType) == PARTITION_FAT_16) || \ - ((PartitionType) == PARTITION_HUGE) || \ - ((PartitionType) == PARTITION_IFS) || \ - ((PartitionType) == PARTITION_FAT32) || \ - ((PartitionType) == PARTITION_FAT32_XINT13) || \ - ((PartitionType) == PARTITION_XINT13) || \ - ((PartitionType) == PARTITION_LINUX) || \ - ((PartitionType) == PARTITION_OLD_LINUX) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \ +((PartitionType) == PARTITION_FAT_12) || \ +((PartitionType) == PARTITION_FAT_16) || \ +((PartitionType) == PARTITION_HUGE) || \ +((PartitionType) == PARTITION_IFS) || \ +((PartitionType) == PARTITION_FAT32) || \ +((PartitionType) == PARTITION_FAT32_XINT13) || \ +((PartitionType) == PARTITION_XINT13) || \ +((PartitionType) == PARTITION_LINUX) || \ +((PartitionType) == PARTITION_OLD_LINUX) || \ ((PartitionType) == PARTITION_ISO9660) || \ - ((PartitionType) == PARTITION_FREEBSD) || \ - ((PartitionType) == PARTITION_OPENBSD) || \ - ((PartitionType) == PARTITION_NETBSD)) +((PartitionType) == PARTITION_FREEBSD) || \ +((PartitionType) == PARTITION_OPENBSD) || \ +((PartitionType) == PARTITION_NETBSD)) #else #define IsRecognizedPartition(PartitionType) ( \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \ - (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \ - ((PartitionType) == PARTITION_FAT_12) || \ - ((PartitionType) == PARTITION_FAT_16) || \ - ((PartitionType) == PARTITION_HUGE) || \ - ((PartitionType) == PARTITION_IFS) || \ - ((PartitionType) == PARTITION_FAT32) || \ - ((PartitionType) == PARTITION_FAT32_XINT13) || \ - ((PartitionType) == PARTITION_XINT13)) +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \ +(((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \ +((PartitionType) == PARTITION_FAT_12) || \ +((PartitionType) == PARTITION_FAT_16) || \ +((PartitionType) == PARTITION_HUGE) || \ +((PartitionType) == PARTITION_IFS) || \ +
[ros-diffs] [cfinck] 75591: [CDFS] - Add a basic CDFS filesystem library "cdfslib" for checking and formatting a CDFS volume. Checking is unimplemented and formatting not supported anyway :) - Use thi
Author: cfinck Date: Thu Aug 17 12:21:27 2017 New Revision: 75591 URL: http://svn.reactos.org/svn/reactos?rev=75591&view=rev Log: [CDFS] - Add a basic CDFS filesystem library "cdfslib" for checking and formatting a CDFS volume. Checking is unimplemented and formatting not supported anyway :) - Use this library in the new "ucdfs" DLL and that DLL in "autochk". Fixes the "Unable to verify a CDFS volume" message at boot. - Return the right device type (FILE_DEVICE_CD_ROM or FILE_DEVICE_DISK) in when querying volume information in cdfs.sys to get the proper icon in Explorer. Added: trunk/reactos/dll/win32/ucdfs/ trunk/reactos/dll/win32/ucdfs/CMakeLists.txt (with props) trunk/reactos/dll/win32/ucdfs/ucdfs.c (with props) trunk/reactos/dll/win32/ucdfs/ucdfs.rc (with props) trunk/reactos/dll/win32/ucdfs/ucdfs.spec (with props) trunk/reactos/sdk/lib/fslib/cdfslib/ trunk/reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt (with props) trunk/reactos/sdk/lib/fslib/cdfslib/cdfslib.c (with props) Modified: trunk/reactos/base/system/autochk/autochk.c trunk/reactos/dll/win32/CMakeLists.txt trunk/reactos/drivers/filesystems/cdfs/volinfo.c trunk/reactos/sdk/lib/fslib/CMakeLists.txt Modified: trunk/reactos/base/system/autochk/autochk.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/autochk/autochk.c?rev=75591&r1=75590&r2=75591&view=diff == --- trunk/reactos/base/system/autochk/autochk.c [iso-8859-1] (original) +++ trunk/reactos/base/system/autochk/autochk.c [iso-8859-1] Thu Aug 17 12:21:27 2017 @@ -283,7 +283,11 @@ { RtlInitUnicodeString(&ProviderDll, L"uffs.dll"); } -else +else if (wcscmp(FileSystem, L"CDFS") == 0) +{ + RtlInitUnicodeString(&ProviderDll, L"ucdfs.dll"); +} +else { return NULL; } Modified: trunk/reactos/dll/win32/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?rev=75591&r1=75590&r2=75591&view=diff == --- trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] Thu Aug 17 12:21:27 2017 @@ -206,6 +206,7 @@ add_subdirectory(traffic) add_subdirectory(twain_32) add_subdirectory(ubtrfs) +add_subdirectory(ucdfs) add_subdirectory(uext2) add_subdirectory(ufat) add_subdirectory(ufatx) Added: trunk/reactos/dll/win32/ucdfs/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/CMakeLists.txt?rev=75591 == --- trunk/reactos/dll/win32/ucdfs/CMakeLists.txt(added) +++ trunk/reactos/dll/win32/ucdfs/CMakeLists.txt[iso-8859-1] Thu Aug 17 12:21:27 2017 @@ -0,0 +1,13 @@ + +spec2def(ucdfs.dll ucdfs.spec) + +list(APPEND SOURCE +ucdfs.c +ucdfs.rc +${CMAKE_CURRENT_BINARY_DIR}/ucdfs.def) + +add_library(ucdfs SHARED ${SOURCE}) +set_module_type(ucdfs nativedll) +target_link_libraries(ucdfs cdfslib) +add_importlibs(ucdfs ntdll) +add_cd_file(TARGET ucdfs DESTINATION reactos/system32 FOR all) Propchange: trunk/reactos/dll/win32/ucdfs/CMakeLists.txt -- svn:eol-style = native Added: trunk/reactos/dll/win32/ucdfs/ucdfs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/ucdfs.c?rev=75591 == --- trunk/reactos/dll/win32/ucdfs/ucdfs.c (added) +++ trunk/reactos/dll/win32/ucdfs/ucdfs.c [iso-8859-1] Thu Aug 17 12:21:27 2017 @@ -0,0 +1,20 @@ +/* + * PROJECT: CDFS File System Management + * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) + * PURPOSE: DLL Initialization + * COPYRIGHT: Copyright 2017 Colin Finck + */ + +#include + +INT WINAPI +DllMain(IN HINSTANCE hinstDLL, +IN DWORD dwReason, +IN LPVOID lpvReserved) +{ +UNREFERENCED_PARAMETER(hinstDLL); +UNREFERENCED_PARAMETER(dwReason); +UNREFERENCED_PARAMETER(lpvReserved); + +return TRUE; +} Propchange: trunk/reactos/dll/win32/ucdfs/ucdfs.c -- svn:eol-style = native Added: trunk/reactos/dll/win32/ucdfs/ucdfs.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/ucdfs.rc?rev=75591 == --- trunk/reactos/dll/win32/ucdfs/ucdfs.rc (added) +++ trunk/reactos/dll/win32/ucdfs/ucdfs.rc [iso-8859-1] Thu Aug 17 12:21:27 2017 @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "CDFS File System Management" +#define REACTOS_STR_INTERNAL_NAME "ucdfs" +#define REACTOS_STR_ORIGINAL_FILENAME "ucdfs.dll" +#include Pro
[ros-diffs] [gadamopoulos] 75592: [ADVAPI32] -RegOpenKeyExW: Call NtOpenKey again with aligned parameters if STATUS_DATATYPE_MISALIGNMENT was returned the first time. CORE-13689
Author: gadamopoulos Date: Thu Aug 17 14:37:24 2017 New Revision: 75592 URL: http://svn.reactos.org/svn/reactos?rev=75592&view=rev Log: [ADVAPI32] -RegOpenKeyExW: Call NtOpenKey again with aligned parameters if STATUS_DATATYPE_MISALIGNMENT was returned the first time. CORE-13689 Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg.c?rev=75592&r1=75591&r2=75592&view=diff == --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Thu Aug 17 14:37:24 2017 @@ -3429,6 +3429,39 @@ samDesired, &ObjectAttributes); +if (Status == STATUS_DATATYPE_MISALIGNMENT) +{ +HANDLE hAligned; +UNICODE_STRING AlignedString; + +Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, + &SubKeyString, + &AlignedString); +if (NT_SUCCESS(Status)) +{ +/* Try again with aligned parameters */ +InitializeObjectAttributes(&ObjectAttributes, + &AlignedString, + Attributes, + KeyHandle, + NULL); + +Status = NtOpenKey(&hAligned, + samDesired, + &ObjectAttributes); + +RtlFreeUnicodeString(&AlignedString); + +if (NT_SUCCESS(Status)) +*phkResult = hAligned; +} +else +{ +/* Restore the original error */ +Status = STATUS_DATATYPE_MISALIGNMENT; +} +} + if (!NT_SUCCESS(Status)) { ErrorCode = RtlNtStatusToDosError(Status);
[ros-diffs] [gadamopoulos] 75593: [COM_APITEST] -Add tests for CLSID_AttachmentServices.
Author: gadamopoulos Date: Thu Aug 17 16:01:29 2017 New Revision: 75593 URL: http://svn.reactos.org/svn/reactos?rev=75593&view=rev Log: [COM_APITEST] -Add tests for CLSID_AttachmentServices. Modified: trunk/rostests/apitests/com/com_apitest.c trunk/rostests/apitests/com/com_apitest.h trunk/rostests/apitests/com/shdocvw.c Modified: trunk/rostests/apitests/com/com_apitest.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/com_apitest.c?rev=75593&r1=75592&r2=75593&view=diff == --- trunk/rostests/apitests/com/com_apitest.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/com_apitest.c [iso-8859-1] Thu Aug 17 16:01:29 2017 @@ -454,7 +454,8 @@ { ID_NAME(IID_IDriveFolderExtOld), TRUE }, { ID_NAME(IID_IDriveFolderExt), TRUE }, { ID_NAME(IID_IPinnedListOld), TRUE }, -{ ID_NAME(IID_IPinnedList), TRUE } +{ ID_NAME(IID_IPinnedList), TRUE }, +{ ID_NAME(IID_IAttachmentExecute), TRUE } }; static const INT KnownInterfaceCount = RTL_NUMBER_OF(KnownInterfaces); Modified: trunk/rostests/apitests/com/com_apitest.h URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/com_apitest.h?rev=75593&r1=75592&r2=75593&view=diff == --- trunk/rostests/apitests/com/com_apitest.h [iso-8859-1] (original) +++ trunk/rostests/apitests/com/com_apitest.h [iso-8859-1] Thu Aug 17 16:01:29 2017 @@ -106,6 +106,7 @@ DEFINE_GUID(CLSID_TrackShellMenu, 0x8278F931, 0x2A3E, 0x11d2, 0x83, 0x8F, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0); DEFINE_GUID(CLSID_UserAssist, 0xdd313e04, 0xfeff, 0x11d1, 0x8e, 0xcd, 0x00, 0x00, 0xf8, 0x7a, 0x47, 0x0c); DEFINE_GUID(CLSID_WebSearchExt,0x07798131, 0xaf23, 0x11d1, 0x91, 0x11, 0x00, 0xa0, 0xc9, 0x8b, 0xa6, 0x7d); +DEFINE_GUID(CLSID_AttachmentServices, 0x4125dd96, 0xe03a, 0x4103, 0x8f, 0x70, 0xe0, 0x59, 0x7d, 0x80, 0x3b, 0x9c); DEFINE_GUID(IID_IADesktopP2, 0xb22754e2, 0x4574, 0x11d1, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9); DEFINE_GUID(IID_IAccessControl,0xeedd23e0, 0x8410, 0x11ce, 0xa1, 0xc3, 0x08, 0x00, 0x2b, 0x2b, 0x8d, 0x8f); @@ -115,6 +116,7 @@ DEFINE_GUID(IID_IActiveDesktop,0xf490eb00, 0x1240, 0x11d1, 0x98, 0x88, 0x00, 0x60, 0x97, 0xde, 0xac, 0xf9); DEFINE_GUID(IID_IActiveDesktopP, 0x52502ee0, 0xec80, 0x11d0, 0x89, 0xab, 0x00, 0xc0, 0x4f, 0xc2, 0x97, 0x2d); DEFINE_GUID(IID_IAddressBarParser, 0xc9d81948, 0x443a, 0x40c7, 0x94, 0x5c, 0x5e, 0x17, 0x1b, 0x8c, 0x66, 0xb4); +DEFINE_GUID(IID_IAttachmentExecute,0x73db1241, 0x1e85, 0x4581, 0x8e, 0x4f, 0xa8, 0x1e, 0x1d, 0x0f, 0x8c, 0x57); DEFINE_GUID(IID_IAugmentedShellFolder, 0x91ea3f8c, 0xc99b, 0x11d0, 0x98, 0x15, 0x00, 0xc0, 0x4f, 0xd9, 0x19, 0x72); DEFINE_GUID(IID_IAugmentedShellFolder2,0x8db3b3f4, 0x6cfe, 0x11d1, 0x8a, 0xe9, 0x00, 0xc0, 0x4f, 0xd9, 0x18, 0xd0); DEFINE_GUID(IID_IBandHost, 0xb9075c7c, 0xd48e, 0x403f, 0xab, 0x99, 0xd6, 0xc7, 0x7a, 0x10, 0x84, 0xac); Modified: trunk/rostests/apitests/com/shdocvw.c URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/com/shdocvw.c?rev=75593&r1=75592&r2=75593&view=diff == --- trunk/rostests/apitests/com/shdocvw.c [iso-8859-1] (original) +++ trunk/rostests/apitests/com/shdocvw.c [iso-8859-1] Thu Aug 17 16:01:29 2017 @@ -230,6 +230,13 @@ {0x0, &IID_IUnknown }, } }, +{ +ID_NAME(CLSID_AttachmentServices ), +{ +{0x0, &IID_IAttachmentExecute }, +{0x0, &IID_IUnknown }, +} +}, }; static const INT ExpectedInterfaceCount = RTL_NUMBER_OF(ExpectedInterfaces);
[ros-diffs] [mjansen] 75594: [ACLAYERS] Add a compatibility shim + layer for the VMWare Horizon setup. This fixes the setup trying to print some debug strings. For now the shim has to be applied manua
Author: mjansen Date: Thu Aug 17 16:27:56 2017 New Revision: 75594 URL: http://svn.reactos.org/svn/reactos?rev=75594&view=rev Log: [ACLAYERS] Add a compatibility shim + layer for the VMWare Horizon setup. This fixes the setup trying to print some debug strings. For now the shim has to be applied manually, however the setup does not complete yet. Patch bits & fixes by Thomas. CORE-13434 Added: trunk/reactos/dll/appcompat/shims/layer/vmhorizon.c (with props) Modified: trunk/reactos/dll/appcompat/shims/layer/CMakeLists.txt trunk/reactos/media/sdb/sysmain.xml Modified: trunk/reactos/dll/appcompat/shims/layer/CMakeLists.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/layer/CMakeLists.txt?rev=75594&r1=75593&r2=75594&view=diff == --- trunk/reactos/dll/appcompat/shims/layer/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/appcompat/shims/layer/CMakeLists.txt [iso-8859-1] Thu Aug 17 16:27:56 2017 @@ -6,6 +6,7 @@ list(APPEND SOURCE dispmode.c versionlie.c +vmhorizon.c main.c layer.spec) Added: trunk/reactos/dll/appcompat/shims/layer/vmhorizon.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/shims/layer/vmhorizon.c?rev=75594 == --- trunk/reactos/dll/appcompat/shims/layer/vmhorizon.c (added) +++ trunk/reactos/dll/appcompat/shims/layer/vmhorizon.c [iso-8859-1] Thu Aug 17 16:27:56 2017 @@ -0,0 +1,142 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Shim library + * FILE:dll/appcompat/shims/layer/vmhorizon.c + * PURPOSE: Shim for VMWare Horizon setup + * PROGRAMMER: Thomas Faber (thomas.fa...@reactos.org) + * Mark Jansen (mark.jan...@reactos.org) + */ + +#define WIN32_NO_STATUS +#include +#include +#include "ntndk.h" + +static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size) +{ +PVOID BaseAddress = Address; +SIZE_T RegionSize = Size; +ULONG OldProtection; +NTSTATUS Status = NtProtectVirtualMemory(NtCurrentProcess(), &BaseAddress, &RegionSize, PAGE_EXECUTE_READWRITE, &OldProtection); +if (NT_SUCCESS(Status)) +{ +SIZE_T Bytes; +Status = NtWriteVirtualMemory(NtCurrentProcess(), Address, Data, Size, &Bytes); +if (NT_SUCCESS(Status) && Bytes != Size) +Status = STATUS_MEMORY_NOT_ALLOCATED; +NtProtectVirtualMemory(NtCurrentProcess(), &BaseAddress, &RegionSize, OldProtection, &OldProtection); +} +return NT_SUCCESS(Status); +} + +static void FixupDll(PLDR_DATA_TABLE_ENTRY LdrEntry) +{ +static const UCHAR Match1[5] = { 0x0C, 0x8B, 0xFC, 0xF3, 0xA5 }; +static const UCHAR Match2[5] = { 0x0C, 0x8B, 0xFC, 0xF3, 0xA5 }; +static const UCHAR Match3[5] = { 0xB0, 0x8B, 0xFC, 0xF3, 0xA5 }; +UCHAR Replacement1[5] = { 0x10, 0x89, 0x34, 0x24, 0x90 }; +UCHAR Replacement2[5] = { 0x10, 0x89, 0x34, 0x24, 0x90 }; +UCHAR Replacement3[5] = { 0xB4, 0x89, 0x34, 0x24, 0x90 }; +#define OFFSET_10x21A6E +#define OFFSET_20x21B04 +#define OFFSET_30x21C3C + + +UCHAR Buffer[5]; +PBYTE Base = LdrEntry->DllBase; +SIZE_T Bytes; + +/* +00020E6E: 0C 8B FC F3 A5 --> 10 89 34 24 90 F11A6E - ef = 21A6E +00020F04: 0C 8B FC F3 A5 --> 10 89 34 24 90 F11B04 - ef = 21B04 +00021C3C: B0 8B FC F3 A5 --> B4 89 34 24 90 F11C3C - ef = 21C3C +*/ +do { +DbgPrint("Module %wZ Loaded at 0x%p, we should patch!\n", &LdrEntry->BaseDllName, LdrEntry->DllBase); +if (!NT_SUCCESS(NtReadVirtualMemory(NtCurrentProcess(), Base + OFFSET_1, Buffer, 5, &Bytes)) || Bytes != 5) +break; +if (memcmp(Buffer, Match1, sizeof(Match1))) +break; + +if (!NT_SUCCESS(NtReadVirtualMemory(NtCurrentProcess(), Base + OFFSET_2, Buffer, 5, &Bytes)) || Bytes != 5) +break; +if (memcmp(Buffer, Match2, sizeof(Match2))) +break; + +if (!NT_SUCCESS(NtReadVirtualMemory(NtCurrentProcess(), Base + OFFSET_3, Buffer, 5, &Bytes)) || Bytes != 5) +break; +if (memcmp(Buffer, Match3, sizeof(Match3))) +break; + +DbgPrint("Module %wZ Loaded at 0x%p, OK to patch!\n", &LdrEntry->BaseDllName, LdrEntry->DllBase); +if (!Write(Base + OFFSET_1, Replacement1, sizeof(Replacement1))) +break; +if (!Write(Base + OFFSET_2, Replacement2, sizeof(Replacement2))) +break; +if (!Write(Base + OFFSET_3, Replacement3, sizeof(Replacement3))) +break; + +NtFlushInstructionCache(NtCurrentProcess(), Base, 0x22000); + +DbgPrint("Module %wZ Loaded at 0x%p, patched!\n", &LdrEntry->BaseDllName, LdrEntry->DllBase); +} while (0); +} + +static BOOLEAN PostfixUnicodeString(const UNICODE_STRING* String1, const UNICOD
[ros-diffs] [gadamopoulos] 75595: [SHELL32] -AddFSClassKeysToArray: Increase the size of the buffer for the value read from the registry. There are cases when 40 are not enough.
Author: gadamopoulos Date: Thu Aug 17 16:35:16 2017 New Revision: 75595 URL: http://svn.reactos.org/svn/reactos?rev=75595&view=rev Log: [SHELL32] -AddFSClassKeysToArray: Increase the size of the buffer for the value read from the registry. There are cases when 40 are not enough. Modified: trunk/reactos/dll/win32/shell32/shlfolder.cpp Modified: trunk/reactos/dll/win32/shell32/shlfolder.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfolder.cpp?rev=75595&r1=75594&r2=75595&view=diff == --- trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] Thu Aug 17 16:35:16 2017 @@ -288,7 +288,7 @@ { AddClassKeyToArray(extension, array, cKeys); -WCHAR wszClass[40], wszClass2[40]; +WCHAR wszClass[MAX_PATH], wszClass2[MAX_PATH]; DWORD dwSize = sizeof(wszClass); if (RegGetValueW(HKEY_CLASSES_ROOT, extension, NULL, RRF_RT_REG_SZ, NULL, wszClass, &dwSize) == ERROR_SUCCESS) {
[ros-diffs] [mjansen] 75596: [SHIMENG] Enable the Application Compatibility framework by default. - Also add disabled keys to configure the logging - Demote a noisy print used in the shim engine. At t
Author: mjansen Date: Thu Aug 17 16:42:29 2017 New Revision: 75596 URL: http://svn.reactos.org/svn/reactos?rev=75596&view=rev Log: [SHIMENG] Enable the Application Compatibility framework by default. - Also add disabled keys to configure the logging - Demote a noisy print used in the shim engine. At this point the shim engine should be functional enough to be used. One thing that remains is creating more shims(fixes) to use, and implement more features for the already existing ones. CORE-13284 Modified: trunk/reactos/boot/bootdata/hivesft.inf trunk/reactos/boot/bootdata/hivesys.inf trunk/reactos/dll/appcompat/apphelp/shimeng.c Modified: trunk/reactos/boot/bootdata/hivesft.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?rev=75596&r1=75595&r2=75596&view=diff == --- trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] Thu Aug 17 16:42:29 2017 @@ -1667,8 +1667,8 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","TransmissionRetryTimeout",0x,"90" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","USERProcessHandleQuota",0x00010001,0x2710 -; App Compat -- Disable on ReactOS -HKLM,"SOFTWARE\Policies\Microsoft\Windows\AppCompat","DisableEngine",0x00010003, 0x0001 +; App Compat -- Enable on ReactOS +;HKLM,"SOFTWARE\Policies\Microsoft\Windows\AppCompat","DisableEngine",0x00010003, 0x0001 ; STRINGS --- Modified: trunk/reactos/boot/bootdata/hivesys.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?rev=75596&r1=75595&r2=75596&view=diff == --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Thu Aug 17 16:42:29 2017 @@ -1417,6 +1417,8 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020002,"%SystemRoot%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020002,"%SystemRoot%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020002,"%SystemRoot%" +;HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","SHIMENG_DEBUG_LEVEL",0x,"4" +;HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","SHIM_DEBUG_LEVEL",0x,"4" ; Known DLLs Modified: trunk/reactos/dll/appcompat/apphelp/shimeng.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/apphelp/shimeng.c?rev=75596&r1=75595&r2=75596&view=diff == --- trunk/reactos/dll/appcompat/apphelp/shimeng.c [iso-8859-1] (original) +++ trunk/reactos/dll/appcompat/apphelp/shimeng.c [iso-8859-1] Thu Aug 17 16:42:29 2017 @@ -1201,13 +1201,13 @@ VOID WINAPI SE_DllUnloaded(PLDR_DATA_TABLE_ENTRY LdrEntry) { -SHIMENG_MSG("(%p)\n", LdrEntry); +SHIMENG_INFO("(%p)\n", LdrEntry); NotifyShims(SHIM_REASON_DLL_UNLOAD, LdrEntry); } BOOL WINAPI SE_IsShimDll(PVOID BaseAddress) { -SHIMENG_MSG("(%p)\n", BaseAddress); +SHIMENG_INFO("(%p)\n", BaseAddress); return SeiGetShimModuleInfo(BaseAddress) != NULL; }
[ros-diffs] [gadamopoulos] 75597: [SHELL32] -Simplify some coe in CShellLink.cpp
Author: gadamopoulos Date: Thu Aug 17 16:46:15 2017 New Revision: 75597 URL: http://svn.reactos.org/svn/reactos?rev=75597&view=rev Log: [SHELL32] -Simplify some coe in CShellLink.cpp Modified: trunk/reactos/dll/win32/shell32/CShellLink.cpp Modified: trunk/reactos/dll/win32/shell32/CShellLink.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CShellLink.cpp?rev=75597&r1=75596&r2=75597&view=diff == --- trunk/reactos/dll/win32/shell32/CShellLink.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/CShellLink.cpp [iso-8859-1] Thu Aug 17 16:46:15 2017 @@ -1690,28 +1690,31 @@ return S_OK; } -static HRESULT SHELL_PidlGetIconLocationW(IShellFolder* psf, LPCITEMIDLIST pidl, +static HRESULT SHELL_PidlGetIconLocationW(PCIDLIST_ABSOLUTE pidl, UINT uFlags, PWSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) { LPCITEMIDLIST pidlLast; +CComPtr psf; HRESULT hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &psf), &pidlLast); -if (SUCCEEDED(hr)) -{ -CComPtr pei; - -hr = psf->GetUIObjectOf(0, 1, &pidlLast, IID_NULL_PPV_ARG(IExtractIconW, &pei)); -if (SUCCEEDED(hr)) -hr = pei->GetIconLocation(uFlags, pszIconFile, cchMax, piIndex, pwFlags); - -psf->Release(); -} - -return hr; +if (FAILED_UNEXPECTEDLY(hr)) +return hr; + +CComPtr pei; +hr = psf->GetUIObjectOf(0, 1, &pidlLast, IID_NULL_PPV_ARG(IExtractIconW, &pei)); +if (FAILED_UNEXPECTEDLY(hr)) +return hr; + +hr = pei->GetIconLocation(uFlags, pszIconFile, cchMax, piIndex, pwFlags); +if (FAILED_UNEXPECTEDLY(hr)) +return hr; + +return S_OK; } HRESULT STDMETHODCALLTYPE CShellLink::GetIconLocation(UINT uFlags, PWSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) { +HRESULT hr; /* * It is possible for a shell link to point to another shell link, * and in particular there is the possibility to point to itself. @@ -1732,33 +1735,30 @@ if (m_pPidl || m_sPath) { -CComPtr pdsk; - -HRESULT hr = SHGetDesktopFolder(&pdsk); -if (SUCCEEDED(hr)) -{ -/* first look for an icon using the PIDL (if present) */ -if (m_pPidl) -hr = SHELL_PidlGetIconLocationW(pdsk, m_pPidl, uFlags, pszIconFile, cchMax, piIndex, pwFlags); -else -hr = E_FAIL; +/* first look for an icon using the PIDL (if present) */ +if (m_pPidl) +hr = SHELL_PidlGetIconLocationW(m_pPidl, uFlags, pszIconFile, cchMax, piIndex, pwFlags); +else +hr = E_FAIL; #if 0 // FIXME: Analyse further whether this is needed... -/* if we couldn't find an icon yet, look for it using the file system path */ -if (FAILED(hr) && m_sPath) +/* if we couldn't find an icon yet, look for it using the file system path */ +if (FAILED(hr) && m_sPath) +{ +LPITEMIDLIST pidl; +CComPtr pdsk; + +hr = SHGetDesktopFolder(&pdsk); + +/* LPITEMIDLIST pidl = ILCreateFromPathW(sPath); */ +hr = pdsk->ParseDisplayName(0, NULL, m_sPath, NULL, &pidl, NULL); +if (SUCCEEDED(hr)) { -LPITEMIDLIST pidl; - -/* LPITEMIDLIST pidl = ILCreateFromPathW(sPath); */ -hr = pdsk->ParseDisplayName(0, NULL, m_sPath, NULL, &pidl, NULL); -if (SUCCEEDED(hr)) -{ -hr = SHELL_PidlGetIconLocationW(pdsk, pidl, uFlags, pszIconFile, cchMax, piIndex, pwFlags); -SHFree(pidl); -} +hr = SHELL_PidlGetIconLocationW(pidl, uFlags, pszIconFile, cchMax, piIndex, pwFlags); +SHFree(pidl); } +} #endif -} return hr; }
[ros-diffs] [tfaber] 75598: [CMIDriver] - Set svn:eol-style to CRLF for inf files. Files that end up on the iso should never have 'native' line endings.
Author: tfaber Date: Thu Aug 17 19:25:32 2017 New Revision: 75598 URL: http://svn.reactos.org/svn/reactos?rev=75598&view=rev Log: [CMIDriver] - Set svn:eol-style to CRLF for inf files. Files that end up on the iso should never have 'native' line endings. Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf (contents, props changed) trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf (contents, props changed) trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf (contents, props changed) trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf (contents, props changed) [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32-WaveRT.inf?rev=75598&r1=75597&r2=75598&view=diff Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x32.inf?rev=75598&r1=75597&r2=75598&view=diff Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64-WaveRT.inf?rev=75598&r1=75597&r2=75598&view=diff Modified: trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/CMIDriver/CM8738-x64.inf?rev=75598&r1=75597&r2=75598&view=diff
[ros-diffs] [tfaber] 75599: [USBHUB_NEW] - Fix interval calculation in USBH_Wait. Patch by Vadim Galyant.
Author: tfaber Date: Thu Aug 17 19:55:13 2017 New Revision: 75599 URL: http://svn.reactos.org/svn/reactos?rev=75599&view=rev Log: [USBHUB_NEW] - Fix interval calculation in USBH_Wait. Patch by Vadim Galyant. Modified: trunk/reactos/drivers/usb/usbhub_new/usbhub.c Modified: trunk/reactos/drivers/usb/usbhub_new/usbhub.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbhub_new/usbhub.c?rev=75599&r1=75598&r2=75599&view=diff == --- trunk/reactos/drivers/usb/usbhub_new/usbhub.c [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbhub_new/usbhub.c [iso-8859-1] Thu Aug 17 19:55:13 2017 @@ -18,7 +18,7 @@ LARGE_INTEGER Interval; DPRINT("USBH_Wait: Milliseconds - %x\n", Milliseconds); -Interval.QuadPart = -1 * Milliseconds + (KeQueryTimeIncrement() - 1); +Interval.QuadPart = -1LL * Milliseconds - ((ULONGLONG)KeQueryTimeIncrement() - 1); return KeDelayExecutionThread(KernelMode, FALSE, &Interval); }
[ros-diffs] [gadamopoulos] 75600: [UXTHEME] -Remove some dead code
Author: gadamopoulos Date: Thu Aug 17 21:31:52 2017 New Revision: 75600 URL: http://svn.reactos.org/svn/reactos?rev=75600&view=rev Log: [UXTHEME] -Remove some dead code Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclient.c?rev=75600&r1=75599&r2=75600&view=diff == --- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Thu Aug 17 21:31:52 2017 @@ -7,26 +7,6 @@ */ #include "uxthemep.h" - -HFONT hMenuFont = NULL; -HFONT hMenuFontBold = NULL; - -void InitMenuFont(VOID) -{ -NONCLIENTMETRICS ncm; - -ncm.cbSize = sizeof(NONCLIENTMETRICS); - -if (!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0)) -{ -return; -} - -hMenuFont = CreateFontIndirect(&ncm.lfMenuFont); - -ncm.lfMenuFont.lfWeight = max(ncm.lfMenuFont.lfWeight + 300, 1000); -hMenuFontBold = CreateFontIndirect(&ncm.lfMenuFont); -} static BOOL IsWindowActive(HWND hWnd, DWORD ExStyle)
[ros-diffs] [gadamopoulos] 75601: [WIN32K] -Fix a bug with TransparentBlt when it should really ignore the alpha channel. CORE-13040. Approved by Timo.
Author: gadamopoulos Date: Thu Aug 17 22:45:51 2017 New Revision: 75601 URL: http://svn.reactos.org/svn/reactos?rev=75601&view=rev Log: [WIN32K] -Fix a bug with TransparentBlt when it should really ignore the alpha channel. CORE-13040. Approved by Timo. Modified: trunk/reactos/win32ss/gdi/dib/dib32bpp.c Modified: trunk/reactos/win32ss/gdi/dib/dib32bpp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/dib/dib32bpp.c?rev=75601&r1=75600&r2=75601&view=diff == --- trunk/reactos/win32ss/gdi/dib/dib32bpp.c[iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/dib/dib32bpp.c[iso-8859-1] Thu Aug 17 22:45:51 2017 @@ -312,7 +312,7 @@ SourceSurf->sizlBitmap.cx > SourceX && SourceSurf->sizlBitmap.cy > SourceY) { Source = DIB_GetSourceIndex(SourceSurf, SourceX, SourceY); -if (Source != iTransColor) +if ((0x00FF & Source) != (0x00FF & iTransColor)) { *DestBits = XLATEOBJ_iXlate(ColorTranslation, Source); }