ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
247 discussions
Start a n
N
ew thread
01/01: [NULL] Additions for the Null driver.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=da5dcdcbf285fe7c6acad…
commit da5dcdcbf285fe7c6acad9623fec3732e216d719 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Apr 22 22:13:52 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Apr 22 22:23:54 2018 +0200 [NULL] Additions for the Null driver. - Allow the driver to be unloaded, as on Windows. - Use a static fast IO dispatch table, instead of allocating one and risking any potential memory allocation failure. - Update the file header. --- drivers/base/null/null.c | 64 +++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/drivers/base/null/null.c b/drivers/base/null/null.c index 610e886ddd..0d4ed541de 100644 --- a/drivers/base/null/null.c +++ b/drivers/base/null/null.c @@ -1,16 +1,19 @@ /* - * PROJECT: ReactOS Kernel - * LICENSE: GPL - See COPYING in the top level directory - * FILE: drivers/base/null/null.c - * PURPOSE: Null Device Driver - * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) - * David Welch (welch(a)mcmail.com) + * PROJECT: ReactOS Kernel + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Null Device Driver + * COPYRIGHT: Copyright 1998-2018 David Welch (welch(a)mcmail.com) + * Copyright 2007-2018 Alex Ionescu (alex.ionescu(a)reactos.org) */ /* INCLUDES ******************************************************************/ #include <wdm.h> +/* GLOBALS *******************************************************************/ + +FAST_IO_DISPATCH FastIoDispatch; + /* FUNCTIONS *****************************************************************/ NTSTATUS @@ -20,6 +23,7 @@ NullQueryFileInformation(OUT PVOID Buffer, IN FILE_INFORMATION_CLASS InformationClass) { PFILE_STANDARD_INFORMATION StandardInfo = Buffer; + PAGED_CODE(); /* We only support one class */ @@ -81,10 +85,11 @@ NTAPI NullDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp); NTSTATUS Status; + PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp); PFILE_OBJECT FileObject; ULONG Length; + PAGED_CODE(); /* Get the file object and check what kind of request this is */ @@ -150,21 +155,33 @@ NullDispatch(IN PDEVICE_OBJECT DeviceObject, return Status; } +VOID +NTAPI +NullUnload(IN PDRIVER_OBJECT DriverObject) +{ + PDEVICE_OBJECT DeviceObject = DriverObject->DeviceObject; + + /* Delete the Null device */ + IoDeleteDevice(DeviceObject); +} + NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) { + NTSTATUS Status; PDEVICE_OBJECT DeviceObject; UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Null"); - NTSTATUS Status; - PFAST_IO_DISPATCH FastIoDispatch; + PAGED_CODE(); + UNREFERENCED_PARAMETER(RegistryPath); + /* Page the driver */ MmPageEntireDriver(DriverEntry); - /* Create null device */ + /* Create the Null device */ Status = IoCreateDevice(DriverObject, 0, &DeviceName, @@ -172,7 +189,8 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, 0, FALSE, &DeviceObject); - if (!NT_SUCCESS(Status)) return Status; + if (!NT_SUCCESS(Status)) + return Status; /* Register driver routines */ DriverObject->MajorFunction[IRP_MJ_CLOSE] = NullDispatch; @@ -181,26 +199,16 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject, DriverObject->MajorFunction[IRP_MJ_READ] = NullDispatch; DriverObject->MajorFunction[IRP_MJ_LOCK_CONTROL] = NullDispatch; DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NullDispatch; + DriverObject->DriverUnload = NullUnload; - /* Allocate the fast I/O dispatch table */ - FastIoDispatch = ExAllocatePoolWithTag(NonPagedPool, - sizeof(FAST_IO_DISPATCH), - 'llun'); - if (!FastIoDispatch) - { - /* Failed, cleanup */ - IoDeleteDevice(DeviceObject); - return STATUS_INSUFFICIENT_RESOURCES; - } - - /* Initialize it */ - RtlZeroMemory(FastIoDispatch, sizeof(FAST_IO_DISPATCH)); - FastIoDispatch->SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH); + /* Initialize the fast I/O dispatch table */ + RtlZeroMemory(&FastIoDispatch, sizeof(FastIoDispatch)); + FastIoDispatch.SizeOfFastIoDispatch = sizeof(FastIoDispatch); /* Setup our pointers */ - FastIoDispatch->FastIoRead = NullRead; - FastIoDispatch->FastIoWrite = NullWrite; - DriverObject->FastIoDispatch = FastIoDispatch; + FastIoDispatch.FastIoRead = NullRead; + FastIoDispatch.FastIoWrite = NullWrite; + DriverObject->FastIoDispatch = &FastIoDispatch; /* Return success */ return STATUS_SUCCESS;
6 years, 8 months
1
0
0
0
05/05: [SDB] Add a fix for Globulation 2 unloading / reloading an aux dll. Reported in https://savannah.nongnu.org/bugs/?53219
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63b6df6bc5978afd29073…
commit 63b6df6bc5978afd290736491d4e97ec08f47328 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 24 14:58:40 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 18:56:44 2018 +0200 [SDB] Add a fix for Globulation 2 unloading / reloading an aux dll. Reported in
https://savannah.nongnu.org/bugs/?53219
--- media/sdb/sysmain.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/media/sdb/sysmain.xml b/media/sdb/sysmain.xml index 03b9b16982..1dd096d2b0 100644 --- a/media/sdb/sysmain.xml +++ b/media/sdb/sysmain.xml @@ -361,5 +361,20 @@ <FLAG_REF NAME="GetDiskFreeSpace2GB" /> </LAYER> + <!-- Applications --> + + <!-- Globulation 2 --> + <EXE NAME="glob2.exe" APP_NAME="Globulation 2" VENDOR="Globulation 2 authors"> + <MATCHING_FILE NAME="*"> + <SIZE>0x471e00</SIZE> + <CHECKSUM>0x89bf7c2a</CHECKSUM> + <MODULE_TYPE>0x3</MODULE_TYPE> + <PE_CHECKSUM>0x4793cf</PE_CHECKSUM> + <LINKER_VERSION>0x10000</LINKER_VERSION> + <LINK_DATE>0x4a9b2979</LINK_DATE> + </MATCHING_FILE> + <SHIM_REF NAME="IgnoreFreeLibrary" COMMAND_LINE="libpng12.dll" /> + </EXE> + </DATABASE> </SDB> \ No newline at end of file
6 years, 8 months
1
0
0
0
04/05: [SDK][ACGENRAL] Add the shim IgnoreFreeLibrary
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8b15a5ecd703433de03e5…
commit 8b15a5ecd703433de03e58f6354b18f490a7e0bc Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 24 14:57:56 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 18:52:00 2018 +0200 [SDK][ACGENRAL] Add the shim IgnoreFreeLibrary --- dll/appcompat/shims/genral/CMakeLists.txt | 1 + dll/appcompat/shims/genral/ignorefreelib.c | 132 +++++++++++++++++++++++++++++ media/sdb/sysmain.xml | 3 + 3 files changed, 136 insertions(+) diff --git a/dll/appcompat/shims/genral/CMakeLists.txt b/dll/appcompat/shims/genral/CMakeLists.txt index 725a2d85f6..86db9bbc91 100644 --- a/dll/appcompat/shims/genral/CMakeLists.txt +++ b/dll/appcompat/shims/genral/CMakeLists.txt @@ -5,6 +5,7 @@ spec2def(acgenral.dll genral.spec) list(APPEND SOURCE ignoredbgout.c + ignorefreelib.c main.c themes.c genral.spec) diff --git a/dll/appcompat/shims/genral/ignorefreelib.c b/dll/appcompat/shims/genral/ignorefreelib.c new file mode 100644 index 0000000000..b0c7ebb991 --- /dev/null +++ b/dll/appcompat/shims/genral/ignorefreelib.c @@ -0,0 +1,132 @@ +/* + * PROJECT: ReactOS 'General' Shim library + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Ignore FreeLibrary calls + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#define WIN32_NO_STATUS +#include <windef.h> +#include <winbase.h> +#include <shimlib.h> +#include <strsafe.h> + + +#define SHIM_NS IgnoreFreeLibrary +#include <setup_shim.inl> + +typedef BOOL(WINAPI* FREELIBRARYPROC)(HMODULE); + +const char** g_Names; +static int g_NameCount; + +BOOL WINAPI SHIM_OBJ_NAME(FreeLibrary)(HMODULE hModule) +{ + char Buffer[MAX_PATH], *Ptr = Buffer; + DWORD len, wanted = ARRAYSIZE(Buffer); + for (;;) + { + len = GetModuleFileNameA(hModule, Ptr, wanted); + if (len < wanted) + break; + + wanted *= 2; + if (Ptr != Buffer) + ShimLib_ShimFree(Ptr); + + Ptr = ShimLib_ShimMalloc(wanted); + if (!Ptr) + break; + } + + if (Ptr && len) + { + char* ModuleName = NULL; + int n; + for (; len; len--) + { + ModuleName = Ptr + len; + if (ModuleName[-1] == '/' || ModuleName[-1] == '\\') + break; + } + for (n = 0; n < g_NameCount; ++n) + { + if (!stricmp(g_Names[n], ModuleName)) + { + SHIM_INFO("Prevented unload of %s\n", ModuleName); + if (Ptr && Ptr != Buffer) + ShimLib_ShimFree(Ptr); + return TRUE; + } + } + } + + if (Ptr && Ptr != Buffer) + ShimLib_ShimFree(Ptr); + + return CALL_SHIM(0, FREELIBRARYPROC)(hModule); +} + +static VOID InitIgnoreFreeLibrary(PCSTR CommandLine) +{ + PCSTR prev, cur; + int count = 1, n = 0; + const char** names; + + if (!CommandLine || !*CommandLine) + return; + + prev = CommandLine; + while ((cur = strchr(prev, ';'))) + { + count++; + prev = cur + 1; + } + + names = ShimLib_ShimMalloc(sizeof(char*) * count); + if (!names) + { + SHIM_WARN("Unable to allocate %u bytes\n", sizeof(char*) * count); + return; + } + + prev = CommandLine; + while ((cur = strchr(prev, ';'))) + { + names[n] = ShimLib_StringNDuplicateA(prev, cur - prev + 1); + if (!names[n]) + { + SHIM_WARN("Unable to allocate %u bytes\n", cur - prev + 2); + return; + } + n++; + prev = cur + 1; + } + names[n] = ShimLib_StringDuplicateA(prev); + if (!names[n]) + { + SHIM_WARN("Unable to allocate last string\n"); + return; + } + + g_Names = names; + g_NameCount = count; +} + +BOOL WINAPI SHIM_OBJ_NAME(Notify)(DWORD fdwReason, PVOID ptr) +{ + if (fdwReason == SHIM_NOTIFY_ATTACH) + { + SHIM_MSG("IgnoreFreeLibrary(%s)\n", SHIM_OBJ_NAME(g_szCommandLine)); + InitIgnoreFreeLibrary(SHIM_OBJ_NAME(g_szCommandLine)); + } + return TRUE; +} + + +#define SHIM_NOTIFY_FN SHIM_OBJ_NAME(Notify) +#define SHIM_NUM_HOOKS 1 +#define SHIM_SETUP_HOOKS \ + SHIM_HOOK(0, "KERNEL32.DLL", "FreeLibrary", SHIM_OBJ_NAME(FreeLibrary)) + +#include <implement_shim.inl> diff --git a/media/sdb/sysmain.xml b/media/sdb/sysmain.xml index c451c28d50..03b9b16982 100644 --- a/media/sdb/sysmain.xml +++ b/media/sdb/sysmain.xml @@ -206,6 +206,9 @@ <SHIM NAME="DisableThemes"> <DLLFILE>acgenral.dll</DLLFILE> </SHIM> + <SHIM NAME="IgnoreFreeLibrary"> + <DLLFILE>acgenral.dll</DLLFILE> + </SHIM> <SHIM NAME="VMHorizonSetup"> <DLLFILE>aclayers.dll</DLLFILE> </SHIM>
6 years, 8 months
1
0
0
0
03/05: [XML2SDB] Add support for TAG_LINK_DATE and TAG_LINKER_VERSION.
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3551953c846a165029ff1…
commit 3551953c846a165029ff1ae85875d57f6b1f6744 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 24 18:42:42 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 18:51:53 2018 +0200 [XML2SDB] Add support for TAG_LINK_DATE and TAG_LINKER_VERSION. --- sdk/tools/xml2sdb/xml2sdb.cpp | 11 ++++------- sdk/tools/xml2sdb/xml2sdb.h | 6 +++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/sdk/tools/xml2sdb/xml2sdb.cpp b/sdk/tools/xml2sdb/xml2sdb.cpp index 3478e0561b..bba0335bfe 100644 --- a/sdk/tools/xml2sdb/xml2sdb.cpp +++ b/sdk/tools/xml2sdb/xml2sdb.cpp @@ -503,12 +503,12 @@ bool MatchingFile::fromXml(XMLHandle dbNode) ProductVersion = ReadStringNode(dbNode, "PRODUCT_VERSION"); FileVersion = ReadStringNode(dbNode, "FILE_VERSION"); BinFileVersion = ReadStringNode(dbNode, "BIN_FILE_VERSION"); - LinkDate = ReadStringNode(dbNode, "LINK_DATE"); + LinkDate = ReadDWordNode(dbNode, "LINK_DATE"); VerLanguage = ReadStringNode(dbNode, "VER_LANGUAGE"); FileDescription = ReadStringNode(dbNode, "FILE_DESCRIPTION"); OriginalFilename = ReadStringNode(dbNode, "ORIGINAL_FILENAME"); UptoBinFileVersion = ReadStringNode(dbNode, "UPTO_BIN_FILE_VERSION"); - LinkerVersion = ReadStringNode(dbNode, "LINKER_VERSION"); + LinkerVersion = ReadDWordNode(dbNode, "LINKER_VERSION"); return true; } @@ -526,17 +526,14 @@ bool MatchingFile::toSdb(PDB pdb, Database& db) db.WriteString(pdb, TAG_FILE_VERSION, FileVersion); if (!BinFileVersion.empty()) SHIM_ERR("TAG_BIN_FILE_VERSION Unimplemented\n"); //db.WriteQWord(pdb, TAG_BIN_FILE_VERSION, BinFileVersion); - if (!LinkDate.empty()) - SHIM_ERR("TAG_LINK_DATE Unimplemented\n"); //db.WriteDWord(pdb, TAG_LINK_DATE, LinkDate); + db.WriteDWord(pdb, TAG_LINK_DATE, LinkDate); if (!VerLanguage.empty()) SHIM_ERR("TAG_VER_LANGUAGE Unimplemented\n"); //db.WriteDWord(pdb, TAG_VER_LANGUAGE, VerLanguage); db.WriteString(pdb, TAG_FILE_DESCRIPTION, FileDescription); db.WriteString(pdb, TAG_ORIGINAL_FILENAME, OriginalFilename); if (!UptoBinFileVersion.empty()) SHIM_ERR("TAG_UPTO_BIN_FILE_VERSION Unimplemented\n"); //db.WriteQWord(pdb, TAG_UPTO_BIN_FILE_VERSION, UptoBinFileVersion); - if (!LinkerVersion.empty()) - SHIM_ERR("TAG_LINKER_VERSION Unimplemented\n"); //db.WriteDWord(pdb, TAG_LINKER_VERSION, LinkerVersion); - + db.WriteDWord(pdb, TAG_LINKER_VERSION, LinkerVersion); return !!db.EndWriteListTag(pdb, tagid); } diff --git a/sdk/tools/xml2sdb/xml2sdb.h b/sdk/tools/xml2sdb/xml2sdb.h index df9e391b44..9958bc5155 100644 --- a/sdk/tools/xml2sdb/xml2sdb.h +++ b/sdk/tools/xml2sdb/xml2sdb.h @@ -123,7 +123,7 @@ struct Layer struct MatchingFile { - MatchingFile() : Size(0), Checksum(0) {;} + MatchingFile() : Size(0), Checksum(0), LinkDate(0), LinkerVersion(0) {;} bool fromXml(XMLHandle dbNode); bool toSdb(PDB pdb, Database& db); @@ -137,12 +137,12 @@ struct MatchingFile std::string ProductVersion; std::string FileVersion; std::string BinFileVersion; - std::string LinkDate; + DWORD LinkDate; std::string VerLanguage; std::string FileDescription; std::string OriginalFilename; std::string UptoBinFileVersion; - std::string LinkerVersion; + DWORD LinkerVersion; }; struct Exe
6 years, 8 months
1
0
0
0
02/05: [SHIMLIB] Update helper functions, add ShimLib_StringNDuplicateA
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2eaf5264848f5fa9b9e0a…
commit 2eaf5264848f5fa9b9e0a35ff589cb6c086bc8de Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 24 14:57:00 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 18:51:48 2018 +0200 [SHIMLIB] Update helper functions, add ShimLib_StringNDuplicateA --- dll/appcompat/shims/shimlib/shimlib.c | 11 ++++++++--- dll/appcompat/shims/shimlib/shimlib.h | 17 +++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dll/appcompat/shims/shimlib/shimlib.c b/dll/appcompat/shims/shimlib/shimlib.c index 54d64799d1..b9c2652ab6 100644 --- a/dll/appcompat/shims/shimlib/shimlib.c +++ b/dll/appcompat/shims/shimlib/shimlib.c @@ -50,11 +50,16 @@ void ShimLib_ShimFree(PVOID pData) HeapFree(g_ShimLib_Heap, 0, pData); } +PCSTR ShimLib_StringNDuplicateA(PCSTR szString, SIZE_T stringLengthIncludingNullTerm) +{ + PSTR NewString = ShimLib_ShimMalloc(stringLengthIncludingNullTerm); + StringCchCopyA(NewString, stringLengthIncludingNullTerm, szString); + return NewString; +} + PCSTR ShimLib_StringDuplicateA(PCSTR szString) { - SIZE_T Length = lstrlenA(szString); - PSTR NewString = ShimLib_ShimMalloc(Length+1); - return lstrcpyA(NewString, szString); + return ShimLib_StringNDuplicateA(szString, lstrlenA(szString) + 1); } BOOL ShimLib_StrAEqualsW(PCSTR szString, PCWSTR wszString) diff --git a/dll/appcompat/shims/shimlib/shimlib.h b/dll/appcompat/shims/shimlib/shimlib.h index b6a6743e7b..5eaf1853ab 100644 --- a/dll/appcompat/shims/shimlib/shimlib.h +++ b/dll/appcompat/shims/shimlib/shimlib.h @@ -2,7 +2,7 @@ * PROJECT: ReactOS Shim helper library * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: ReactOS Shim Engine common functions / structures - * COPYRIGHT: Copyright 2016,2017 Mark Jansen (mark.jansen(a)reactos.org) + * COPYRIGHT: Copyright 2016-2018 Mark Jansen (mark.jansen(a)reactos.org) */ #pragma once @@ -17,16 +17,17 @@ typedef struct tagHOOKAPI } HOOKAPI, *PHOOKAPI; -PVOID ShimLib_ShimMalloc(SIZE_T); -void ShimLib_ShimFree(PVOID); -PCSTR ShimLib_StringDuplicateA(PCSTR); -BOOL ShimLib_StrAEqualsW(PCSTR, PCWSTR); +PVOID ShimLib_ShimMalloc(SIZE_T dwSize); +VOID ShimLib_ShimFree(PVOID pData); +PCSTR ShimLib_StringDuplicateA(PCSTR szString); +PCSTR ShimLib_StringNDuplicateA(PCSTR szString, SIZE_T stringLength); +BOOL ShimLib_StrAEqualsW(PCSTR szString, PCWSTR wszString); /* Forward events to generic handlers */ -void ShimLib_Init(HINSTANCE); -void ShimLib_Deinit(void); -PHOOKAPI WINAPI ShimLib_GetHookAPIs(LPCSTR,LPCWSTR,PDWORD); +VOID ShimLib_Init(HINSTANCE hInstance); +VOID ShimLib_Deinit(VOID); +PHOOKAPI WINAPI ShimLib_GetHookAPIs(LPCSTR szCommandLine,LPCWSTR wszShimName,PDWORD pdwHookCount); BOOL WINAPI ShimLib_NotifyShims(DWORD fdwReason, PVOID ptr);
6 years, 8 months
1
0
0
0
01/05: [APPSHIM_APITEST] Add a test for the shim IgnoreFreeLibrary
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0a5a0a3501ec1371b55b2…
commit 0a5a0a3501ec1371b55b28cfc983656a30ef32ea Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 24 14:55:11 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 18:51:21 2018 +0200 [APPSHIM_APITEST] Add a test for the shim IgnoreFreeLibrary --- modules/rostests/apitests/appshim/CMakeLists.txt | 1 + modules/rostests/apitests/appshim/ignorefreelib.c | 138 ++++++++++++++++++++++ modules/rostests/apitests/appshim/testlist.c | 2 + 3 files changed, 141 insertions(+) diff --git a/modules/rostests/apitests/appshim/CMakeLists.txt b/modules/rostests/apitests/appshim/CMakeLists.txt index 8884ce2606..b48600ceaa 100644 --- a/modules/rostests/apitests/appshim/CMakeLists.txt +++ b/modules/rostests/apitests/appshim/CMakeLists.txt @@ -4,6 +4,7 @@ add_definitions(-D__ROS_LONG64__) list(APPEND SOURCE dispmode.c genral_hooks.c + ignorefreelib.c layer_hooks.c versionlie.c testlist.c diff --git a/modules/rostests/apitests/appshim/ignorefreelib.c b/modules/rostests/apitests/appshim/ignorefreelib.c new file mode 100644 index 0000000000..29b55449ce --- /dev/null +++ b/modules/rostests/apitests/appshim/ignorefreelib.c @@ -0,0 +1,138 @@ +/* + * PROJECT: appshim_apitest + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Tests for IgnoreFreeLibrary shim + * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#include <ntstatus.h> +#define WIN32_NO_STATUS +#include <windows.h> +#include "wine/test.h" + +#include "appshim_apitest.h" + +static tGETHOOKAPIS pGetHookAPIs; + +typedef BOOL(WINAPI* FREELIBRARYPROC)(HMODULE); + + +static void test_IgnoreFreeLibrary(VOID) +{ + DWORD num_shims = 0; + PHOOKAPI hook; + HMODULE avifil32, esent, msi; + FREELIBRARYPROC freeProc; + + // Show that: + // * partial names (both start + end) do not work. + // * wildcards do not work + // * comparison is case insensitive + // * multiple dlls can be specified + hook = pGetHookAPIs("AvIFiL32.Dll;esent;esent*;ent.dll;msi.dll", L"IgnoreFreeLibrary", &num_shims); + + ok(hook != NULL, "Expected hook to be a valid pointer\n"); + ok(num_shims == 1, "Expected num_shims to be 1, was: %u\n", num_shims); + + if (!hook || !num_shims) + return; + + ok_str(hook->LibraryName, "KERNEL32.DLL"); + ok_str(hook->FunctionName, "FreeLibrary"); + + avifil32 = LoadLibraryA("avifil32.dll"); + ok(avifil32 != NULL, "Unable to load avifil32\n"); + + esent = LoadLibraryA("esent.dll"); + ok(esent != NULL, "Unable to load esent\n"); + + msi = LoadLibraryA("msi.dll"); + ok(msi != NULL, "Unable to load msi\n"); + + hook->OriginalFunction = FreeLibrary; + freeProc = hook->ReplacementFunction; + + ok(freeProc != NULL, "\n"); + + if (!freeProc) + return; + + // Not unloading + ok(freeProc(avifil32), "Unable to unload avifil32\n"); + avifil32 = GetModuleHandleA("avifil32.dll"); + ok(avifil32 != NULL, "avifil32 should not unload\n"); + + // Unloading + ok(freeProc(esent), "Unable to unload esent\n"); + esent = GetModuleHandleA("esent.dll"); + ok(esent == NULL, "esent should be unloaded\n"); + + // Not unloading + ok(freeProc(msi), "Unable to unload msi\n"); + msi = GetModuleHandleA("msi.dll"); + ok(msi != NULL, "msi should not unload\n"); +} + + +START_TEST(ignorefreelib) +{ + HMODULE avifil32, esent, msi; + LONG initial; + + pGetHookAPIs = LoadShimDLL2(L"acgenral.dll"); + + if (!pGetHookAPIs) + return; + + /* Ensure that we can freely load / unload avifil32, esent and msi */ + + initial = winetest_get_failures(); + + avifil32 = GetModuleHandleA("avifil32.dll"); + ok_ptr(avifil32, NULL); + esent = GetModuleHandleA("esent.dll"); + ok_ptr(esent, NULL); + msi = GetModuleHandleA("msi.dll"); + ok_ptr(msi, NULL); + + avifil32 = LoadLibraryA("avifil32.dll"); + ok(avifil32 != NULL, "Unable to load avifil32\n"); + esent = GetModuleHandleA("esent.dll"); + ok_ptr(esent, NULL); + msi = GetModuleHandleA("msi.dll"); + ok_ptr(msi, NULL); + + ok(FreeLibrary(avifil32), "Unable to unload avifil32\n"); + avifil32 = GetModuleHandleA("avifil32.dll"); + ok_ptr(avifil32, NULL); + + esent = LoadLibraryA("esent.dll"); + ok(esent != NULL, "Unable to load esent\n"); + avifil32 = GetModuleHandleA("avifil32.dll"); + ok_ptr(avifil32, NULL); + msi = GetModuleHandleA("msi.dll"); + ok_ptr(msi, NULL); + + ok(FreeLibrary(esent), "Unable to unload esent\n"); + esent = GetModuleHandleA("esent.dll"); + ok_ptr(esent, NULL); + + msi = LoadLibraryA("msi.dll"); + ok(msi != NULL, "Unable to load msi\n"); + avifil32 = GetModuleHandleA("avifil32.dll"); + ok_ptr(avifil32, NULL); + esent = GetModuleHandleA("esent.dll"); + ok_ptr(esent, NULL); + + ok(FreeLibrary(msi), "Unable to unload msi\n"); + msi = GetModuleHandleA("msi.dll"); + ok_ptr(msi, NULL); + + if (initial != winetest_get_failures()) + { + // We cannot continue, one or more of our target dll's does not behave as expected + return; + } + + test_IgnoreFreeLibrary(); +} diff --git a/modules/rostests/apitests/appshim/testlist.c b/modules/rostests/apitests/appshim/testlist.c index 45275de5cd..a3e7b7132d 100644 --- a/modules/rostests/apitests/appshim/testlist.c +++ b/modules/rostests/apitests/appshim/testlist.c @@ -5,6 +5,7 @@ extern void func_dispmode(void); extern void func_genral_hooks(void); +extern void func_ignorefreelib(void); extern void func_layer_hooks(void); extern void func_versionlie(void); @@ -12,6 +13,7 @@ const struct test winetest_testlist[] = { { "dispmode", func_dispmode }, { "genral_hooks", func_genral_hooks }, + { "ignorefreelib", func_ignorefreelib }, { "layer_hooks", func_layer_hooks }, { "versionlie", func_versionlie }, { 0, 0 }
6 years, 8 months
1
0
0
0
01/01: [ZIPFLDR] Fix russian translation
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4970f92d6c8d94edb61ea…
commit 4970f92d6c8d94edb61ea84a3c640593ed1cea23 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Apr 22 17:42:20 2018 +0200 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Sun Apr 22 17:43:05 2018 +0200 [ZIPFLDR] Fix russian translation --- dll/shellext/zipfldr/lang/ru-RU.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/shellext/zipfldr/lang/ru-RU.rc b/dll/shellext/zipfldr/lang/ru-RU.rc index 2bd50f0149..7e7a38ed62 100644 --- a/dll/shellext/zipfldr/lang/ru-RU.rc +++ b/dll/shellext/zipfldr/lang/ru-RU.rc @@ -28,7 +28,7 @@ BEGIN LTEXT "Все файлы были извлечены в следующую директорию:",IDC_STATIC,6,12,222,18 LTEXT "Целевой путь",IDC_DESTDIR,6,36,222,8 CONTROL "Показать извлечённые файлы",IDC_SHOW_EXTRACTED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,66,118,10 - LTEXT "Нажмите \"Готово\" чтобы продолжить.",IDC_STATIC,6,84,174,8 + LTEXT "Нажмите ""Готово"" чтобы продолжить.",IDC_STATIC,6,84,174,8 END IDD_CONFIRM_FILE_REPLACE DIALOGEX 0, 0, 273, 56
6 years, 8 months
1
0
0
0
03/03: [SHELL32] Partially sync SHGetFileInfo with wine to improve folder type names. CORE-14542
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b569195ecfec4ac65185d…
commit b569195ecfec4ac65185d87a64f3b2c2fad9dad7 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Apr 21 13:31:29 2018 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 17:38:44 2018 +0200 [SHELL32] Partially sync SHGetFileInfo with wine to improve folder type names. CORE-14542 --- dll/win32/shell32/wine/shell32_main.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/dll/win32/shell32/wine/shell32_main.c b/dll/win32/shell32/wine/shell32_main.c index e64ef7f6fb..5b9ca5eae8 100644 --- a/dll/win32/shell32/wine/shell32_main.c +++ b/dll/win32/shell32/wine/shell32_main.c @@ -553,8 +553,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, /* get the type name */ if (SUCCEEDED(hr) && (flags & SHGFI_TYPENAME)) { + static const WCHAR szFolder[] = { 'F','o','l','d','e','r',0 }; static const WCHAR szFile[] = { 'F','i','l','e',0 }; - static const WCHAR szDashFile[] = { '-','f','i','l','e',0 }; + static const WCHAR szSpaceFile[] = { ' ','f','i','l','e',0 }; if (!(flags & SHGFI_USEFILEATTRIBUTES) || (flags & SHGFI_PIDL)) { @@ -566,17 +567,29 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, else { if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - strcatW (psfi->szTypeName, szFile); + strcatW (psfi->szTypeName, szFolder); else { WCHAR sTemp[64]; lstrcpyW(sTemp,PathFindExtensionW(szFullPath)); - if (!( HCR_MapTypeToValueW(sTemp, sTemp, 64, TRUE) && + if (sTemp[0] == 0 || (sTemp[0] == '.' && sTemp[1] == 0)) + { + /* "name" or "name." => "File" */ + lstrcpynW (psfi->szTypeName, szFile, 64); + } + else if (!( HCR_MapTypeToValueW(sTemp, sTemp, 64, TRUE) && HCR_MapTypeToValueW(sTemp, psfi->szTypeName, 80, FALSE ))) { - lstrcpynW (psfi->szTypeName, sTemp, 64); - strcatW (psfi->szTypeName, szDashFile); + if (sTemp[0]) + { + lstrcpynW (psfi->szTypeName, sTemp, 64); + strcatW (psfi->szTypeName, szSpaceFile); + } + else + { + lstrcpynW (psfi->szTypeName, szFile, 64); + } } } }
6 years, 8 months
1
0
0
0
02/03: [ZIPFLDR] Various usability improvements - Take the user-entered folder into account - Hide size / ratio for folders CORE-14543 CORE-14542
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fd0b834a0a11f0ffd622a…
commit fd0b834a0a11f0ffd622ad59fb29a7bf5e33e43e Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Apr 21 12:50:05 2018 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 17:38:44 2018 +0200 [ZIPFLDR] Various usability improvements - Take the user-entered folder into account - Hide size / ratio for folders CORE-14543 CORE-14542 --- dll/shellext/zipfldr/CZipExtract.cpp | 33 ++++++++++++++++++++++++++++++++- dll/shellext/zipfldr/CZipFolder.hpp | 8 +++++++- dll/shellext/zipfldr/zippidl.cpp | 2 ++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/dll/shellext/zipfldr/CZipExtract.cpp b/dll/shellext/zipfldr/CZipExtract.cpp index 0b5465a52c..258f9b34a1 100644 --- a/dll/shellext/zipfldr/CZipExtract.cpp +++ b/dll/shellext/zipfldr/CZipExtract.cpp @@ -12,10 +12,12 @@ class CZipExtract : { CStringW m_Filename; CStringW m_Directory; + bool m_DirectoryChanged; unzFile uf; public: CZipExtract(PCWSTR Filename) - :uf(NULL) + :m_DirectoryChanged(false) + ,uf(NULL) { m_Filename = Filename; m_Directory = m_Filename; @@ -158,6 +160,7 @@ public: int OnSetActive() { SetDlgItemTextW(IDC_DIRECTORY, m_pExtract->m_Directory); + m_pExtract->m_DirectoryChanged = false; ::EnableWindow(GetDlgItem(IDC_PASSWORD), FALSE); /* Not supported for now */ GetParent().CenterWindow(::GetDesktopWindow()); return 0; @@ -169,6 +172,9 @@ public: ::EnableWindow(GetDlgItem(IDC_DIRECTORY), FALSE); ::EnableWindow(GetDlgItem(IDC_PASSWORD), FALSE); + if (m_pExtract->m_DirectoryChanged) + UpdateDirectory(); + if (!m_pExtract->Extract(m_hWnd, GetDlgItem(IDC_PROGRESS))) { /* Extraction failed, do not go to the next page */ @@ -211,6 +217,9 @@ public: CStringW title(MAKEINTRESOURCEW(IDS_WIZ_BROWSE_TITLE)); bi.lpszTitle = title; + if (m_pExtract->m_DirectoryChanged) + UpdateDirectory(); + browse_info info = { m_hWnd, m_pExtract->m_Directory.GetString() }; bi.lParam = (LPARAM)&info; @@ -222,21 +231,35 @@ public: { m_pExtract->m_Directory = tmpPath; SetDlgItemTextW(IDC_DIRECTORY, m_pExtract->m_Directory); + m_pExtract->m_DirectoryChanged = false; } return 0; } + LRESULT OnEnChangeDirectory(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) + { + m_pExtract->m_DirectoryChanged = true; + return 0; + } + LRESULT OnPassword(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { return 0; } + void UpdateDirectory() + { + GetDlgItemText(IDC_DIRECTORY, m_pExtract->m_Directory); + m_pExtract->m_DirectoryChanged = false; + } + public: enum { IDD = IDD_PROPPAGEDESTINATION }; BEGIN_MSG_MAP(CCompleteSettingsPage) COMMAND_ID_HANDLER(IDC_BROWSE, OnBrowse) COMMAND_ID_HANDLER(IDC_PASSWORD, OnPassword) + COMMAND_HANDLER(IDC_DIRECTORY, EN_CHANGE, OnEnChangeDirectory) CHAIN_MSG_MAP(CPropertyPageImpl<CExtractSettingsPage>) END_MSG_MAP() }; @@ -319,6 +342,7 @@ public: if (err != UNZ_OK) { DPRINT1("ERROR, unzGetGlobalInfo64: 0x%x\n", err); + Close(); return false; } @@ -326,6 +350,7 @@ public: if (!zipEnum.initialize(this)) { DPRINT1("ERROR, zipEnum.initialize\n"); + Close(); return false; } @@ -351,6 +376,7 @@ public: HRESULT hr = SHPathPrepareForWriteA(hDlg, NULL, FullPath, dwFlags); if (FAILED_UNEXPECTEDLY(hr)) { + Close(); return false; } CurrentFile++; @@ -363,6 +389,7 @@ public: if (err != UNZ_OK) { DPRINT1("ERROR, unzOpenCurrentFilePassword: 0x%x\n", err); + Close(); return false; } @@ -386,6 +413,8 @@ public: case CConfirmReplace::No: break; case CConfirmReplace::Cancel: + unzCloseCurrentFile(uf); + Close(); return false; } } @@ -408,6 +437,7 @@ public: { unzCloseCurrentFile(uf); DPRINT1("ERROR, CreateFileA: 0x%x (%s)\n", dwErr, bOverwriteAll ? "Y" : "N"); + Close(); return false; } } @@ -454,6 +484,7 @@ public: { unzCloseCurrentFile(uf); DPRINT1("ERROR, unzReadCurrentFile2: 0x%x\n", err); + Close(); return false; } else diff --git a/dll/shellext/zipfldr/CZipFolder.hpp b/dll/shellext/zipfldr/CZipFolder.hpp index fa98673ff2..2b7010c4fa 100644 --- a/dll/shellext/zipfldr/CZipFolder.hpp +++ b/dll/shellext/zipfldr/CZipFolder.hpp @@ -172,6 +172,9 @@ public: case 2: /* Compressed size */ case 4: /* Size */ { + if (isDir) + return SHSetStrRet(&psd->str, L""); + ULONG64 Size = iColumn == 2 ? zipEntry->CompressedSize : zipEntry->UncompressedSize; if (!StrFormatByteSizeW(Size, Buffer, _countof(Buffer))) return E_FAIL; @@ -183,8 +186,11 @@ public: return SHSetStrRet(&psd->str, _AtlBaseModule.GetResourceInstance(), zipEntry->Password ? IDS_YES : IDS_NO); case 5: /* Ratio */ { + if (isDir) + return SHSetStrRet(&psd->str, L""); + int ratio = 0; - if (zipEntry->UncompressedSize && !isDir) + if (zipEntry->UncompressedSize) ratio = 100 - (int)((zipEntry->CompressedSize*100)/zipEntry->UncompressedSize); StringCchPrintfW(Buffer, _countof(Buffer), L"%d%%", ratio); return SHSetStrRet(&psd->str, Buffer); diff --git a/dll/shellext/zipfldr/zippidl.cpp b/dll/shellext/zipfldr/zippidl.cpp index 1e1eb9f57f..79b23c3b00 100644 --- a/dll/shellext/zipfldr/zippidl.cpp +++ b/dll/shellext/zipfldr/zippidl.cpp @@ -14,6 +14,8 @@ LPITEMIDLIST _ILCreate(ZipPidlType Type, LPCSTR lpString, unz_file_info64& info) if (!pidl) return NULL; + ZeroMemory(pidl, cbData + sizeof(WORD)); + pidl->cb = cbData; pidl->MagicType = 'z'; pidl->ZipType = Type;
6 years, 8 months
1
0
0
0
01/03: [ATL] Add COMMAND_HANDLER macro. CORE-14543
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2c90194ae470d7d758cc2…
commit 2c90194ae470d7d758cc2d7765ff50187ba04d9a Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Apr 21 12:48:08 2018 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Apr 22 17:38:38 2018 +0200 [ATL] Add COMMAND_HANDLER macro. CORE-14543 --- sdk/lib/atl/atlwin.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h index 02b078ee55..a4f717c7c2 100644 --- a/sdk/lib/atl/atlwin.h +++ b/sdk/lib/atl/atlwin.h @@ -1804,6 +1804,15 @@ public: return TRUE; \ } +#define COMMAND_HANDLER(id, code, func) \ + if (uMsg == WM_COMMAND && id == LOWORD(wParam) && code == HIWORD(wParam)) \ + { \ + bHandled = TRUE; \ + lResult = func(HIWORD(wParam), LOWORD(wParam), (HWND)lParam, bHandled); \ + if (bHandled) \ + return TRUE; \ + } + #define COMMAND_ID_HANDLER(id, func) \ if (uMsg == WM_COMMAND && id == LOWORD(wParam)) \ { \
6 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
25
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Results per page:
10
25
50
100
200