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
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
October 2023
----- 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
21 participants
140 discussions
Start a n
N
ew thread
[reactos] 01/01: [MSPAINT] s/WINBOOL/BOOL/
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bc28675a448039f6490ff…
commit bc28675a448039f6490ff196bdaa4d9a542b3603 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Thu Oct 12 19:13:20 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Thu Oct 12 19:13:20 2023 +0900 [MSPAINT] s/WINBOOL/BOOL/ CORE-19094 --- base/applications/mspaint/toolsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/applications/mspaint/toolsettings.cpp b/base/applications/mspaint/toolsettings.cpp index daf1bfc064e..182862ec305 100644 --- a/base/applications/mspaint/toolsettings.cpp +++ b/base/applications/mspaint/toolsettings.cpp @@ -281,7 +281,7 @@ VOID CToolSettingsWindow::drawBox(HDC hdc, LPCRECT prc) } } -LRESULT CToolSettingsWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, WINBOOL& bHandled) +LRESULT CToolSettingsWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { /* preloading the draw transparent/nontransparent icons for later use */ m_hNontranspIcon = (HICON)LoadImage(g_hinstExe, MAKEINTRESOURCE(IDI_NONTRANSPARENT),
1 year
1
0
0
0
[reactos] 01/01: [FREELDR] Enable UEFI boot for x86 and amd64 (#5267)
by Justin Miller
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ff3dadf89d999c0212de9…
commit ff3dadf89d999c0212de9ec4fa9d7f7c05ee2967 Author: Justin Miller <justin.miller(a)reactos.org> AuthorDate: Wed Oct 11 12:45:08 2023 -0700 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Oct 11 12:45:08 2023 -0700 [FREELDR] Enable UEFI boot for x86 and amd64 (#5267) Co-authored-by: Stanislav Motylkov <x86corez(a)gmail.com> Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> - Allow to boot NT kernel on UEFI systems with our 2 primary supported architectures - Implement remaining code needed to pass execution to x86 and amd64 kernels CORE-11954 --- boot/freeldr/freeldr/arch/uefi/amd64/uefiasm.S | 85 ++++++++++++++ boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S | 109 ++++++++++++++++++ boot/freeldr/freeldr/arch/uefi/stubs.c | 6 - boot/freeldr/freeldr/arch/uefi/ueficon.c | 1 - boot/freeldr/freeldr/arch/uefi/uefihw.c | 149 +++++++++++++++++++++++++ boot/freeldr/freeldr/arch/uefi/uefildr.c | 55 ++++++++- boot/freeldr/freeldr/arch/uefi/uefimem.c | 81 +++++--------- boot/freeldr/freeldr/arch/uefi/uefisetup.c | 1 - boot/freeldr/freeldr/uefi.cmake | 13 ++- 9 files changed, 435 insertions(+), 65 deletions(-) diff --git a/boot/freeldr/freeldr/arch/uefi/amd64/uefiasm.S b/boot/freeldr/freeldr/arch/uefi/amd64/uefiasm.S new file mode 100644 index 00000000000..c4cd78d1e0b --- /dev/null +++ b/boot/freeldr/freeldr/arch/uefi/amd64/uefiasm.S @@ -0,0 +1,85 @@ +/* + * PROJECT: FreeLoader UEFI Support + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: x64 assembly UEFI escape helper functions + * COPYRIGHT: Copyright 2023 Justin Miller <justinmiller100(a)gmail.com> + */ + +#include <asm.inc> +#include <arch/pc/x86common.h> +#include <arch/pc/pcbios.h> + +EXTERN UefiServiceStack:QWORD +EXTERN BasicStack:QWORD +EXTERN ExecuteLoaderCleanly:PROC +EXTERN UefiExitBootServices:PROC + +.code64 + +// void _exituefi(VOID) +PUBLIC _exituefi +_exituefi: + /* Save non-volatile registers */ + push rbp + push rsi + push rdi + push rbx + + /* Save the old stack */ + mov rbx, rsp + + /* Load the new stack */ + xor rbp, rbp + mov rsp, qword ptr UefiServiceStack[rip] + + /* Call the entry routine, passing the parameters */ + mov rax, UefiExitBootServices[rip] + call rax + + /* Retore old stack */ + mov rsp, rbx + + /* Retore non-volatiles */ + pop rbx + pop rdi + pop rsi + pop rbp + +#ifdef _USE_ML + lgdt fword ptr [_gdtptr] +#else + lgdt cs:[_gdtptr][rip] /* GAS isn't my friend - avoid letting it generate absolute addressing */ +#endif + + /* All done */ + ret + +// void _changestack(VOID) +PUBLIC _changestack +_changestack: + mov rax, rsp + mov rsp, BasicStack[rip] + push rax + call ExecuteLoaderCleanly[rip] + ret + +.align 8 +gdt: + .word HEX(0000), HEX(0000), HEX(0000), HEX(0000) /* 00: NULL descriptor */ + .word HEX(0000), HEX(0000), HEX(0000), HEX(0000) /* 08: */ + .word HEX(0000), HEX(0000), HEX(9800), HEX(0020) /* 10: long mode CS */ + .word HEX(FFFF), HEX(0000), HEX(F300), HEX(00CF) /* 18: long mode DS */ + .word HEX(FFFF), HEX(0000), HEX(9E00), HEX(0000) /* 20: 16-bit real mode CS */ + .word HEX(FFFF), HEX(0000), HEX(9200), HEX(0000) /* 28: 16-bit real mode DS */ + .word HEX(FFFF), HEX(0000), HEX(9B00), HEX(00CF) /* 30: compat mode CS */ + +/* GDT table pointer */ +_gdtptr: + .word HEX(37) /* Limit */ +#ifdef _USE_ML + .quad gdt /* Base Address */ +#else + .quad gdt, 0 /* Base Address */ +#endif + +END diff --git a/boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S b/boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S new file mode 100644 index 00000000000..64de25daa20 --- /dev/null +++ b/boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S @@ -0,0 +1,109 @@ +/* + * PROJECT: FreeLoader UEFI Support + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: i386 assembly UEFI escape helper functions + * COPYRIGHT: Copyright 2023 Justin Miller <justinmiller100(a)gmail.com> + */ + +#include <asm.inc> +#include <arch/pc/x86common.h> +#include <arch/pc/pcbios.h> + +PUBLIC _gdtptr +PUBLIC _i386idtptr +PUBLIC __changestack +EXTERN _UefiServiceStack:DWORD +EXTERN _i386Idt:DWORD +EXTERN _ExecuteLoaderCleanly:PROC +EXTERN _UefiExitBootServices:PROC +EXTERN _BasicStack:DWORD +.code32 + +// void __exituefi(VOID) +PUBLIC __exituefi +__exituefi: + push ebp + push esi + push edi + push ebx + + /* Save the old stack */ + mov ebx, esp + + /* Load the new stack */ + xor ebp, ebp + mov esp, _UefiServiceStack + + /* Call the entry routine, passing the parameters */ + call _UefiExitBootServices + + /* Retore old stack */ + mov esp, ebx + + /* Retore non-volatiles */ + pop ebx + pop edi + pop esi + pop ebp + +#ifdef _USE_ML + lidt fword ptr ds:[_i386idtptr] + lgdt fword ptr [_gdtptr] +#else + lgdt cs:[_gdtptr] + lidt _i386idtptr +#endif + + /* All done */ + ret + +// void __reloadsegment(VOID) +PUBLIC __changestack +__changestack: + mov eax, esp + mov esp, _BasicStack + push eax + call _ExecuteLoaderCleanly + ret + + .align 4 /* force 4-byte alignment */ +gdt: + /* NULL Descriptor */ + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + + /* 32-bit flat CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9A00) + .word HEX(00CF) + + /* 32-bit flat DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(00CF) + + /* 16-bit real mode CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9E00) + .word HEX(0000) + + /* 16-bit real mode DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(0000) + +/* GDT table pointer */ +_gdtptr: + .word HEX(27) /* Limit */ + .long gdt, 0 /* Base Address */ + +_i386idtptr: + .word 255 /* Limit */ + .long _i386Idt /* Base Address */ +END diff --git a/boot/freeldr/freeldr/arch/uefi/stubs.c b/boot/freeldr/freeldr/arch/uefi/stubs.c index ac5cebab51c..e9263d60ba3 100644 --- a/boot/freeldr/freeldr/arch/uefi/stubs.c +++ b/boot/freeldr/freeldr/arch/uefi/stubs.c @@ -43,12 +43,6 @@ UefiGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, } -PCONFIGURATION_COMPONENT_DATA -UefiHwDetect(VOID) -{ - return 0; -} - VOID UefiPcBeep(VOID) { diff --git a/boot/freeldr/freeldr/arch/uefi/ueficon.c b/boot/freeldr/freeldr/arch/uefi/ueficon.c index 000b6b9d3a7..6dc6eb5b8b6 100644 --- a/boot/freeldr/freeldr/arch/uefi/ueficon.c +++ b/boot/freeldr/freeldr/arch/uefi/ueficon.c @@ -138,6 +138,5 @@ UefiConsGetCh(VOID) /* UEFI will stack input requests, we have to clear it */ Key.UnicodeChar = 0; Key.ScanCode = 0; - GlobalSystemTable->ConIn->Reset(GlobalSystemTable->ConIn, FALSE); return KeyOutput; } diff --git a/boot/freeldr/freeldr/arch/uefi/uefihw.c b/boot/freeldr/freeldr/arch/uefi/uefihw.c new file mode 100644 index 00000000000..8dcf9602274 --- /dev/null +++ b/boot/freeldr/freeldr/arch/uefi/uefihw.c @@ -0,0 +1,149 @@ +/* + * PROJECT: FreeLoader UEFI Support + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Hardware detection routines + * COPYRIGHT: Copyright 2022 Justin Miller <justinmiller100(a)gmail.com> + */ + +/* INCLUDES ******************************************************************/ + +#include <uefildr.h> + +#include <debug.h> +DBG_DEFAULT_CHANNEL(WARNING); + +/* GLOBALS *******************************************************************/ + +extern EFI_SYSTEM_TABLE * GlobalSystemTable; +extern EFI_HANDLE GlobalImageHandle; +extern UCHAR PcBiosDiskCount; +extern EFI_MEMORY_DESCRIPTOR* EfiMemoryMap; +extern UINT32 FreeldrDescCount; + +BOOLEAN AcpiPresent = FALSE; + +/* FUNCTIONS *****************************************************************/ + +static +PRSDP_DESCRIPTOR +FindAcpiBios(VOID) +{ + UINTN i; + RSDP_DESCRIPTOR* rsdp = NULL; + EFI_GUID acpi2_guid = EFI_ACPI_20_TABLE_GUID; + + for (i = 0; i < GlobalSystemTable->NumberOfTableEntries; i++) + { + if (!memcmp(&GlobalSystemTable->ConfigurationTable[i].VendorGuid, + &acpi2_guid, sizeof(acpi2_guid))) + { + rsdp = (RSDP_DESCRIPTOR*)GlobalSystemTable->ConfigurationTable[i].VendorTable; + break; + } + } + + return rsdp; +} + +VOID +DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) +{ + PCONFIGURATION_COMPONENT_DATA BiosKey; + PCM_PARTIAL_RESOURCE_LIST PartialResourceList; + PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor; + PRSDP_DESCRIPTOR Rsdp; + PACPI_BIOS_DATA AcpiBiosData; + ULONG TableSize; + + Rsdp = FindAcpiBios(); + + if (Rsdp) + { + /* Set up the flag in the loader block */ + AcpiPresent = TRUE; + + /* Calculate the table size */ + TableSize = FreeldrDescCount * sizeof(BIOS_MEMORY_MAP) + + sizeof(ACPI_BIOS_DATA) - sizeof(BIOS_MEMORY_MAP); + + /* Set 'Configuration Data' value */ + PartialResourceList = FrLdrHeapAlloc(sizeof(CM_PARTIAL_RESOURCE_LIST) + + TableSize, TAG_HW_RESOURCE_LIST); + if (PartialResourceList == NULL) + { + ERR("Failed to allocate resource descriptor\n"); + return; + } + + RtlZeroMemory(PartialResourceList, sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize); + PartialResourceList->Version = 0; + PartialResourceList->Revision = 0; + PartialResourceList->Count = 1; + + PartialDescriptor = &PartialResourceList->PartialDescriptors[0]; + PartialDescriptor->Type = CmResourceTypeDeviceSpecific; + PartialDescriptor->ShareDisposition = CmResourceShareUndetermined; + PartialDescriptor->u.DeviceSpecificData.DataSize = TableSize; + + /* Fill the table */ + AcpiBiosData = (PACPI_BIOS_DATA)&PartialResourceList->PartialDescriptors[1]; + + if (Rsdp->revision > 0) + { + TRACE("ACPI >1.0, using XSDT address\n"); + AcpiBiosData->RSDTAddress.QuadPart = Rsdp->xsdt_physical_address; + } + else + { + TRACE("ACPI 1.0, using RSDT address\n"); + AcpiBiosData->RSDTAddress.LowPart = Rsdp->rsdt_physical_address; + } + + AcpiBiosData->Count = FreeldrDescCount; + memcpy(AcpiBiosData->MemoryMap, EfiMemoryMap, + FreeldrDescCount * sizeof(BIOS_MEMORY_MAP)); + + TRACE("RSDT %p, data size %x\n", Rsdp->rsdt_physical_address, TableSize); + + /* Create new bus key */ + FldrCreateComponentKey(SystemKey, + AdapterClass, + MultiFunctionAdapter, + 0x0, + 0x0, + 0xFFFFFFFF, + "ACPI BIOS", + PartialResourceList, + sizeof(CM_PARTIAL_RESOURCE_LIST) + TableSize, + &BiosKey); + + /* Increment bus number */ + (*BusNumber)++; + } +} + +PCONFIGURATION_COMPONENT_DATA +UefiHwDetect(VOID) +{ + PCONFIGURATION_COMPONENT_DATA SystemKey; + ULONG BusNumber = 0; + + TRACE("DetectHardware()\n"); + + /* Create the 'System' key */ +#if defined(_M_IX86) || defined(_M_AMD64) + FldrCreateSystemKey(&SystemKey, "AT/AT COMPATIBLE"); +#elif defined(_M_IA64) + FldrCreateSystemKey(&SystemKey, "Intel Itanium processor family"); +#elif defined(_M_ARM) || defined(_M_ARM64) + FldrCreateSystemKey(&SystemKey, "ARM processor family"); +#else + #error Please define a system key for your architecture +#endif + + /* Detect ACPI */ + DetectAcpiBios(SystemKey, &BusNumber); + + TRACE("DetectHardware() Done\n"); + return SystemKey; +} diff --git a/boot/freeldr/freeldr/arch/uefi/uefildr.c b/boot/freeldr/freeldr/arch/uefi/uefildr.c index ef0dd85cba3..9f801d978a8 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefildr.c +++ b/boot/freeldr/freeldr/arch/uefi/uefildr.c @@ -8,11 +8,16 @@ #include <uefildr.h> #include <debug.h> +DBG_DEFAULT_CHANNEL(WARNING); /* GLOBALS ********************************************************************/ EFI_HANDLE GlobalImageHandle; EFI_SYSTEM_TABLE *GlobalSystemTable; +PVOID UefiServiceStack; +PVOID BasicStack; + +void _changestack(VOID); /* FUNCTIONS ******************************************************************/ @@ -25,15 +30,61 @@ EfiEntry( GlobalImageHandle = ImageHandle; GlobalSystemTable = SystemTable; - BootMain(NULL); + /* Needed for default settings */ + CmdLineParse(""); + + /* Debugger pre-initialization */ + DebugInit(0); + + MachInit(""); + + /* UI pre-initialization */ + if (!UiInitialize(FALSE)) + { + UiMessageBoxCritical("Unable to initialize UI."); + goto Quit; + } + + /* Initialize memory manager */ + if (!MmInitializeMemoryManager()) + { + UiMessageBoxCritical("Unable to initialize memory manager."); + goto Quit; + } + + /* Initialize I/O subsystem */ + FsInit(); + + /* 0x32000 is what UEFI defines, but we can go smaller if we want */ + BasicStack = (PVOID)((ULONG_PTR)0x32000 + (ULONG_PTR)MmAllocateMemoryWithType(0x32000, LoaderOsloaderStack)); + _changestack(); + +Quit: + /* If we reach this point, something went wrong before, therefore reboot */ + Reboot(); UNREACHABLE; return 0; } +void +ExecuteLoaderCleanly(PVOID PreviousStack) +{ + TRACE("ExecuteLoaderCleanly Entry\n"); + UefiServiceStack = PreviousStack; + + RunLoader(); + UNREACHABLE; +} + #ifndef _M_ARM VOID __cdecl Reboot(VOID) { - + //TODO: Replace with a true firmware reboot eventually + WARN("Something has gone wrong - halting FreeLoader\n"); + for (;;) + { + NOTHING; + } } #endif diff --git a/boot/freeldr/freeldr/arch/uefi/uefimem.c b/boot/freeldr/freeldr/arch/uefi/uefimem.c index 03a62150ef9..464b1f11783 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefimem.c +++ b/boot/freeldr/freeldr/arch/uefi/uefimem.c @@ -27,6 +27,7 @@ AddMemoryDescriptor( /* GLOBALS *******************************************************************/ +extern ULONG LoaderPagesSpanned; extern EFI_SYSTEM_TABLE* GlobalSystemTable; extern EFI_HANDLE GlobalImageHandle; extern REACTOS_INTERNAL_BGCONTEXT framebufferData; @@ -39,6 +40,8 @@ EFI_HANDLE PublicBootHandle; PVOID ExitStack; PVOID EndofExitStack; +void _exituefi(VOID); + /* FUNCTIONS *****************************************************************/ static @@ -85,56 +88,13 @@ VOID UefiSetMemory( _Inout_ PFREELDR_MEMORY_DESCRIPTOR MemoryMap, _In_ ULONG_PTR BaseAddress, - _In_ PFN_COUNT Size, + _In_ PFN_COUNT SizeInPages, _In_ TYPE_OF_MEMORY MemoryType) { ULONG_PTR BasePage, PageCount; BasePage = BaseAddress / EFI_PAGE_SIZE; - PageCount = Size; - - /* Add the memory descriptor */ - FreeldrDescCount = AddMemoryDescriptor(MemoryMap, - UNUSED_MAX_DESCRIPTOR_COUNT, - BasePage, - PageCount, - MemoryType); -} - -VOID -ReserveMemory( - _Inout_ PFREELDR_MEMORY_DESCRIPTOR MemoryMap, - _In_ ULONG_PTR BaseAddress, - _In_ PFN_NUMBER Size, - _In_ TYPE_OF_MEMORY MemoryType, - _In_ PCHAR Usage) -{ - ULONG_PTR BasePage, PageCount; - ULONG i; - - BasePage = BaseAddress / PAGE_SIZE; - PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(BaseAddress, Size); - - for (i = 0; i < FreeldrDescCount; i++) - { - /* Check for conflicting descriptor */ - if ((MemoryMap[i].BasePage < BasePage + PageCount) && - (MemoryMap[i].BasePage + MemoryMap[i].PageCount > BasePage)) - { - /* Check if the memory is free */ - if (MemoryMap[i].MemoryType != LoaderFree) - { - FrLdrBugCheckWithMessage( - MEMORY_INIT_FAILURE, - __FILE__, - __LINE__, - "Failed to reserve memory in the range 0x%Ix - 0x%Ix for %s", - BaseAddress, - Size, - Usage); - } - } - } + PageCount = SizeInPages; /* Add the memory descriptor */ FreeldrDescCount = AddMemoryDescriptor(MemoryMap, @@ -256,19 +216,36 @@ UefiMemGetMemoryMap(ULONG *MemoryMapSize) } } - UefiSetMemory(FreeldrMem, - MapEntry->PhysicalStart, - MapEntry->NumberOfPages, - MemoryType); + /* Sometimes our loader can be loaded into higher memory than we ever allocate */ + if (MemoryType == LoaderLoadedProgram) + { + if (((MapEntry->PhysicalStart + (MapEntry->NumberOfPages * PAGE_SIZE)) >> EFI_PAGE_SHIFT) > LoaderPagesSpanned) + { + /* This value needs to be adjusted if this occurs */ + LoaderPagesSpanned = ((MapEntry->PhysicalStart + (MapEntry->NumberOfPages * PAGE_SIZE)) >> EFI_PAGE_SHIFT); + } + } + + /* We really don't want to touch these reserved spots at all */ + if (MemoryType != LoaderReserve) + { + UefiSetMemory(FreeldrMem, + MapEntry->PhysicalStart, + MapEntry->NumberOfPages, + MemoryType); + } MapEntry = NEXT_MEMORY_DESCRIPTOR(MapEntry, DescriptorSize); } + /* Windows expects the first page to be reserved, otherwise it asserts. + * However it can be just a free page on some UEFI systems. */ + UefiSetMemory(FreeldrMem, 0x000000, 1, LoaderFirmwarePermanent); *MemoryMapSize = FreeldrDescCount; return FreeldrMem; } -static VOID +VOID UefiExitBootServices(VOID) { UINTN MapKey; @@ -306,7 +283,5 @@ UefiExitBootServices(VOID) VOID UefiPrepareForReactOS(VOID) { - UefiExitBootServices(); - ExitStack = MmAllocateMemoryWithType(EXIT_STACK_SIZE, LoaderOsloaderStack); - EndofExitStack = (PVOID)((ULONG_PTR)ExitStack + EXIT_STACK_SIZE); + _exituefi(); } diff --git a/boot/freeldr/freeldr/arch/uefi/uefisetup.c b/boot/freeldr/freeldr/arch/uefi/uefisetup.c index 01d1be758a1..ec3b0d405a6 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefisetup.c +++ b/boot/freeldr/freeldr/arch/uefi/uefisetup.c @@ -14,7 +14,6 @@ DBG_DEFAULT_CHANNEL(WARNING); extern EFI_SYSTEM_TABLE* GlobalSystemTable; extern EFI_HANDLE GlobalImageHandle; -BOOLEAN AcpiPresent = FALSE; /* FUNCTIONS ******************************************************************/ diff --git a/boot/freeldr/freeldr/uefi.cmake b/boot/freeldr/freeldr/uefi.cmake index 76483f0529e..a3bc6a7e2e0 100644 --- a/boot/freeldr/freeldr/uefi.cmake +++ b/boot/freeldr/freeldr/uefi.cmake @@ -16,6 +16,7 @@ list(APPEND UEFILDR_ARC_SOURCE arch/uefi/stubs.c arch/uefi/ueficon.c arch/uefi/uefidisk.c + arch/uefi/uefihw.c arch/uefi/uefimem.c arch/uefi/uefisetup.c arch/uefi/uefiutil.c @@ -23,11 +24,14 @@ list(APPEND UEFILDR_ARC_SOURCE arch/vgafont.c) if(ARCH STREQUAL "i386") + list(APPEND UEFILDR_ARC_SOURCE + arch/i386/i386idt.c) list(APPEND UEFILDR_COMMON_ASM_SOURCE + arch/uefi/i386/uefiasm.S arch/i386/i386trap.S) - elseif(ARCH STREQUAL "amd64") - #TBD + list(APPEND UEFILDR_COMMON_ASM_SOURCE + arch/uefi/amd64/uefiasm.S) elseif(ARCH STREQUAL "arm") list(APPEND UEFILDR_ARC_SOURCE arch/arm/macharm.c @@ -88,6 +92,11 @@ set_target_properties(uefildr PROPERTIES SUFFIX ".efi") target_compile_definitions(uefildr PRIVATE UEFIBOOT) +# On AMD64 we only map 1GB with freeloader, tell UEFI to keep us low! +if(ARCH STREQUAL "amd64") + set_image_base(uefildr 0x10000) +endif() + if(MSVC) if(NOT ARCH STREQUAL "arm") target_link_options(uefildr PRIVATE /DYNAMICBASE:NO)
1 year
1
0
0
0
[reactos] 01/01: [KS] KsRead/WriteFile: finish IRP initialization and properly setup I/O stack location for it (#5784)
by Oleg Dubinskiy
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a6b281c2280710e684a20…
commit a6b281c2280710e684a208deb07abd9838ce7cb6 Author: Oleg Dubinskiy <oleg.dubinskij30(a)gmail.com> AuthorDate: Tue Oct 10 22:30:00 2023 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Oct 10 13:30:00 2023 -0700 [KS] KsRead/WriteFile: finish IRP initialization and properly setup I/O stack location for it (#5784) - Initialize the rest of IRP data which is not initialized by IoBuildSynchronousFsdRequest. - Setup an IO_STACK_LOCATION structure for the IRP before calling the driver's read/write routine. - Do this for both KsReadFile and KsWriteFile functions in our Kernel Streaming driver (ks.sys). This fixes several problems when calling these functions from outside, so now they are working correctly, as expected. Discovered during my audio investigations. CORE-19232 --- drivers/ksfilter/ks/irp.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/ksfilter/ks/irp.c b/drivers/ksfilter/ks/irp.c index 91302e67299..01ee18c2832 100644 --- a/drivers/ksfilter/ks/irp.c +++ b/drivers/ksfilter/ks/irp.c @@ -150,6 +150,7 @@ KsReadFile( IN KPROCESSOR_MODE RequestorMode) { PDEVICE_OBJECT DeviceObject; + PIO_STACK_LOCATION IoStack; PIRP Irp; NTSTATUS Status; BOOLEAN Result; @@ -216,6 +217,16 @@ KsReadFile( return STATUS_INSUFFICIENT_RESOURCES; } + /* setup the rest of irp */ + Irp->RequestorMode = RequestorMode; + Irp->Overlay.AsynchronousParameters.UserApcContext = PortContext; + Irp->Tail.Overlay.OriginalFileObject = FileObject; + + /* setup irp stack */ + IoStack = IoGetNextIrpStackLocation(Irp); + IoStack->FileObject = FileObject; + IoStack->Parameters.Read.Key = Key; + /* send the packet */ Status = IoCallDriver(DeviceObject, Irp); @@ -250,6 +261,7 @@ KsWriteFile( IN KPROCESSOR_MODE RequestorMode) { PDEVICE_OBJECT DeviceObject; + PIO_STACK_LOCATION IoStack; PIRP Irp; NTSTATUS Status; BOOLEAN Result; @@ -316,6 +328,16 @@ KsWriteFile( return STATUS_INSUFFICIENT_RESOURCES; } + /* setup the rest of irp */ + Irp->RequestorMode = RequestorMode; + Irp->Overlay.AsynchronousParameters.UserApcContext = PortContext; + Irp->Tail.Overlay.OriginalFileObject = FileObject; + + /* setup irp stack */ + IoStack = IoGetNextIrpStackLocation(Irp); + IoStack->FileObject = FileObject; + IoStack->Parameters.Write.Key = Key; + /* send the packet */ Status = IoCallDriver(DeviceObject, Irp);
1 year, 1 month
1
0
0
0
[reactos] 01/01: [DEVMGR] Allow to copy text from Details page of device properties (#5775)
by Alexey Strukov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8451230753d1941471ec2…
commit 8451230753d1941471ec2f41a522e70caae2e1a9 Author: Alexey Strukov <oplkill(a)gmail.com> AuthorDate: Tue Oct 10 22:22:54 2023 +0300 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Oct 10 21:22:54 2023 +0200 [DEVMGR] Allow to copy text from Details page of device properties (#5775) In driver properties, in details tab, add a "Copy" popup menu for listview. This will allow to copy driver's information to buffer. --- dll/win32/devmgr/lang/bg-BG.rc | 1 + dll/win32/devmgr/lang/cs-CZ.rc | 1 + dll/win32/devmgr/lang/de-DE.rc | 1 + dll/win32/devmgr/lang/el-GR.rc | 1 + dll/win32/devmgr/lang/en-US.rc | 1 + dll/win32/devmgr/lang/es-ES.rc | 1 + dll/win32/devmgr/lang/et-EE.rc | 1 + dll/win32/devmgr/lang/fr-FR.rc | 1 + dll/win32/devmgr/lang/he-IL.rc | 1 + dll/win32/devmgr/lang/hu-HU.rc | 1 + dll/win32/devmgr/lang/id-ID.rc | 1 + dll/win32/devmgr/lang/it-IT.rc | 1 + dll/win32/devmgr/lang/ja-JP.rc | 1 + dll/win32/devmgr/lang/no-NO.rc | 1 + dll/win32/devmgr/lang/pl-PL.rc | 1 + dll/win32/devmgr/lang/pt-BR.rc | 1 + dll/win32/devmgr/lang/pt-PT.rc | 1 + dll/win32/devmgr/lang/ro-RO.rc | 1 + dll/win32/devmgr/lang/ru-RU.rc | 1 + dll/win32/devmgr/lang/sk-SK.rc | 1 + dll/win32/devmgr/lang/sq-AL.rc | 1 + dll/win32/devmgr/lang/tr-TR.rc | 1 + dll/win32/devmgr/lang/uk-UA.rc | 1 + dll/win32/devmgr/lang/zh-CN.rc | 1 + dll/win32/devmgr/lang/zh-HK.rc | 1 + dll/win32/devmgr/lang/zh-TW.rc | 1 + dll/win32/devmgr/properties/advprop.cpp | 71 +++++++++++++++++++++++++++++++++ dll/win32/devmgr/resource.h | 2 + 28 files changed, 99 insertions(+) diff --git a/dll/win32/devmgr/lang/bg-BG.rc b/dll/win32/devmgr/lang/bg-BG.rc index 608e9e7651d..269a7844700 100644 --- a/dll/win32/devmgr/lang/bg-BG.rc +++ b/dll/win32/devmgr/lang/bg-BG.rc @@ -31,6 +31,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "За&помняне" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/cs-CZ.rc b/dll/win32/devmgr/lang/cs-CZ.rc index ec0b3b73cdf..7ea12cccda2 100644 --- a/dll/win32/devmgr/lang/cs-CZ.rc +++ b/dll/win32/devmgr/lang/cs-CZ.rc @@ -36,6 +36,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Rozsah I/O" + IDS_COPY "&Kopírovat" END /* puvodni anglicke error messages prevzaty z:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/de-DE.rc b/dll/win32/devmgr/lang/de-DE.rc index 2ee2bf7bf55..79b8da95d40 100644 --- a/dll/win32/devmgr/lang/de-DE.rc +++ b/dll/win32/devmgr/lang/de-DE.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "E/A-Bereich" + IDS_COPY "&Kopieren" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/el-GR.rc b/dll/win32/devmgr/lang/el-GR.rc index d340a974d12..99e5d1d9c3a 100644 --- a/dll/win32/devmgr/lang/el-GR.rc +++ b/dll/win32/devmgr/lang/el-GR.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "&Αντιγραφή" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/en-US.rc b/dll/win32/devmgr/lang/en-US.rc index 73800ecd181..5d5686bbadc 100644 --- a/dll/win32/devmgr/lang/en-US.rc +++ b/dll/win32/devmgr/lang/en-US.rc @@ -31,6 +31,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "&Copy" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/es-ES.rc b/dll/win32/devmgr/lang/es-ES.rc index 73f747e5cb5..adace42dd18 100644 --- a/dll/win32/devmgr/lang/es-ES.rc +++ b/dll/win32/devmgr/lang/es-ES.rc @@ -40,6 +40,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Intervalo de E/S" + IDS_COPY "&Copiar" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/et-EE.rc b/dll/win32/devmgr/lang/et-EE.rc index 24b2e1079e0..61d47b5c0b4 100644 --- a/dll/win32/devmgr/lang/et-EE.rc +++ b/dll/win32/devmgr/lang/et-EE.rc @@ -38,6 +38,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O ulatus" + IDS_COPY "&Kopeeri" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/fr-FR.rc b/dll/win32/devmgr/lang/fr-FR.rc index daa0cd14706..183c09623c9 100644 --- a/dll/win32/devmgr/lang/fr-FR.rc +++ b/dll/win32/devmgr/lang/fr-FR.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Rang I/O" + IDS_COPY "&Copier" END STRINGTABLE diff --git a/dll/win32/devmgr/lang/he-IL.rc b/dll/win32/devmgr/lang/he-IL.rc index 7b782c4a024..6d2723856e6 100644 --- a/dll/win32/devmgr/lang/he-IL.rc +++ b/dll/win32/devmgr/lang/he-IL.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "הע&תק" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/hu-HU.rc b/dll/win32/devmgr/lang/hu-HU.rc index 41285a298e3..7fc86b5fc73 100644 --- a/dll/win32/devmgr/lang/hu-HU.rc +++ b/dll/win32/devmgr/lang/hu-HU.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O tartomány" + IDS_COPY "&Másolás" END STRINGTABLE diff --git a/dll/win32/devmgr/lang/id-ID.rc b/dll/win32/devmgr/lang/id-ID.rc index 057db41bada..86d44ad468e 100644 --- a/dll/win32/devmgr/lang/id-ID.rc +++ b/dll/win32/devmgr/lang/id-ID.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Rentang I/O" + IDS_COPY "&Salin" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/it-IT.rc b/dll/win32/devmgr/lang/it-IT.rc index a196f6f55aa..09b5d6a3b60 100644 --- a/dll/win32/devmgr/lang/it-IT.rc +++ b/dll/win32/devmgr/lang/it-IT.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "&Copia" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/ja-JP.rc b/dll/win32/devmgr/lang/ja-JP.rc index 6b8ccd29c2e..1fc049d01d4 100644 --- a/dll/win32/devmgr/lang/ja-JP.rc +++ b/dll/win32/devmgr/lang/ja-JP.rc @@ -31,6 +31,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O 範囲" + IDS_COPY "コピー(&C)" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/no-NO.rc b/dll/win32/devmgr/lang/no-NO.rc index ac18e97f48d..cb027cc7d2d 100644 --- a/dll/win32/devmgr/lang/no-NO.rc +++ b/dll/win32/devmgr/lang/no-NO.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "&Kopier" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/pl-PL.rc b/dll/win32/devmgr/lang/pl-PL.rc index 479997fa0ca..5f37465a4dc 100644 --- a/dll/win32/devmgr/lang/pl-PL.rc +++ b/dll/win32/devmgr/lang/pl-PL.rc @@ -42,6 +42,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Zakres I/O" + IDS_COPY "&Kopiuj" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/pt-BR.rc b/dll/win32/devmgr/lang/pt-BR.rc index 5111ca30069..e6ecb1f8f82 100644 --- a/dll/win32/devmgr/lang/pt-BR.rc +++ b/dll/win32/devmgr/lang/pt-BR.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "&Copiar" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/pt-PT.rc b/dll/win32/devmgr/lang/pt-PT.rc index 5870e00a93a..d58c67ab136 100644 --- a/dll/win32/devmgr/lang/pt-PT.rc +++ b/dll/win32/devmgr/lang/pt-PT.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Faixa I/O" + IDS_COPY "&Copiar" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/ro-RO.rc b/dll/win32/devmgr/lang/ro-RO.rc index 22af2d2e240..aa6842b766c 100644 --- a/dll/win32/devmgr/lang/ro-RO.rc +++ b/dll/win32/devmgr/lang/ro-RO.rc @@ -40,6 +40,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Domeniu In/Ex" + IDS_COPY "&Copiază" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/ru-RU.rc b/dll/win32/devmgr/lang/ru-RU.rc index 2926b4953c6..32a798665fa 100644 --- a/dll/win32/devmgr/lang/ru-RU.rc +++ b/dll/win32/devmgr/lang/ru-RU.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "Диапазон I/O" + IDS_COPY "&Копировать" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/sk-SK.rc b/dll/win32/devmgr/lang/sk-SK.rc index 3974a5abbb9..74b95fa6590 100644 --- a/dll/win32/devmgr/lang/sk-SK.rc +++ b/dll/win32/devmgr/lang/sk-SK.rc @@ -36,6 +36,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "&Kopírovať" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/sq-AL.rc b/dll/win32/devmgr/lang/sq-AL.rc index 5662c85ba95..a92819f36e1 100644 --- a/dll/win32/devmgr/lang/sq-AL.rc +++ b/dll/win32/devmgr/lang/sq-AL.rc @@ -35,6 +35,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O shtrirje" + IDS_COPY "&Kopjo" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/tr-TR.rc b/dll/win32/devmgr/lang/tr-TR.rc index 8e5bb542e2d..b3ba51800b9 100644 --- a/dll/win32/devmgr/lang/tr-TR.rc +++ b/dll/win32/devmgr/lang/tr-TR.rc @@ -33,6 +33,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "G/Ç Aralığı" + IDS_COPY "K&opyala" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/uk-UA.rc b/dll/win32/devmgr/lang/uk-UA.rc index 35be22bf9f6..c84b01481ff 100644 --- a/dll/win32/devmgr/lang/uk-UA.rc +++ b/dll/win32/devmgr/lang/uk-UA.rc @@ -39,6 +39,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O range" + IDS_COPY "Копі&ювати" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/zh-CN.rc b/dll/win32/devmgr/lang/zh-CN.rc index ecd5e6344e9..ee8db668545 100644 --- a/dll/win32/devmgr/lang/zh-CN.rc +++ b/dll/win32/devmgr/lang/zh-CN.rc @@ -40,6 +40,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O 范围" + IDS_COPY "复制(&C)" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/zh-HK.rc b/dll/win32/devmgr/lang/zh-HK.rc index 4c5cbcc46f5..96bdc5655fa 100644 --- a/dll/win32/devmgr/lang/zh-HK.rc +++ b/dll/win32/devmgr/lang/zh-HK.rc @@ -39,6 +39,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O 範圍" + IDS_COPY "複製(&C)" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/lang/zh-TW.rc b/dll/win32/devmgr/lang/zh-TW.rc index 94e4b65df6c..76f1ba1db40 100644 --- a/dll/win32/devmgr/lang/zh-TW.rc +++ b/dll/win32/devmgr/lang/zh-TW.rc @@ -39,6 +39,7 @@ BEGIN IDS_RESOURCE_INTERRUPT "IRQ" IDS_RESOURCE_DMA "DMA" IDS_RESOURCE_PORT "I/O 範圍" + IDS_COPY "複製(&C)" END /* error messages, source:
http://www.z123.org/techsupport/medm.htm
*/ diff --git a/dll/win32/devmgr/properties/advprop.cpp b/dll/win32/devmgr/properties/advprop.cpp index aac24a749f7..c53fe65a46c 100644 --- a/dll/win32/devmgr/properties/advprop.cpp +++ b/dll/win32/devmgr/properties/advprop.cpp @@ -1897,6 +1897,31 @@ AdvProcDetailsDlgProc(IN HWND hwndDlg, { switch (uMsg) { + case WM_CONTEXTMENU: + { + if ((HWND)wParam == GetDlgItem(hwndDlg, IDC_DETAILSPROPVALUE)) + { + WCHAR szColName[255]; + + if (!LoadStringW(hDllInstance, IDS_COPY, szColName, _countof(szColName))) + break; + + INT nSelectedItems = ListView_GetSelectedCount((HWND)wParam); + POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; + HMENU hPopup = CreatePopupMenu(); + + AppendMenuW(hPopup, MF_STRING, IDS_MENU_COPY, szColName); + + if (nSelectedItems <= 0) + EnableMenuItem(hPopup, IDS_MENU_COPY, MF_BYCOMMAND | MF_GRAYED); + + TrackPopupMenu(hPopup, TPM_LEFTALIGN, pt.x, pt.y, 0, hwndDlg, NULL); + DestroyMenu(hPopup); + Ret = TRUE; + } + break; + } + case WM_COMMAND: { switch (LOWORD(wParam)) @@ -1909,6 +1934,52 @@ AdvProcDetailsDlgProc(IN HWND hwndDlg, GetDlgItem(hwndDlg, IDC_DETAILSPROPVALUE)); } break; + + case IDS_MENU_COPY: + { + HWND hwndListView = GetDlgItem(hwndDlg, IDC_DETAILSPROPVALUE); + INT nSelectedItems = ListView_GetSelectedCount(hwndListView); + INT nSelectedId = ListView_GetSelectionMark(hwndListView); + + if (nSelectedId < 0 || nSelectedItems <= 0) + break; + + TCHAR szItemName[MAX_PATH]; + HGLOBAL hGlobal; + LPWSTR pszBuffer; + + ListView_GetItemText(hwndListView, + nSelectedId, 0, + szItemName, + _countof(szItemName)); + + hGlobal = GlobalAlloc(GHND, MAX_PATH); + if (!hGlobal) + break; + pszBuffer = (LPWSTR)GlobalLock(hGlobal); + if (!pszBuffer) + { + GlobalFree(hGlobal); + break; + } + + wsprintf(pszBuffer, L"%s", szItemName); + + GlobalUnlock(hGlobal); + + if (OpenClipboard(NULL)) + { + EmptyClipboard(); + SetClipboardData(CF_UNICODETEXT, hGlobal); + CloseClipboard(); + Ret = TRUE; + } + else + { + GlobalFree(hGlobal); + } + break; + } } break; } diff --git a/dll/win32/devmgr/resource.h b/dll/win32/devmgr/resource.h index b99006e05ac..a515dfaba38 100644 --- a/dll/win32/devmgr/resource.h +++ b/dll/win32/devmgr/resource.h @@ -61,6 +61,7 @@ #define IDS_MENU_SCAN 94 #define IDS_MENU_ADD 95 #define IDS_MENU_PROPERTIES 96 +#define IDS_MENU_COPY 97 /* menu hints */ @@ -127,6 +128,7 @@ #define IDS_RESOURCE_INTERRUPT 0x11A #define IDS_RESOURCE_DMA 0x11B #define IDS_RESOURCE_PORT 0x11C +#define IDS_COPY 0x11D #define IDS_DEV_NO_PROBLEM 0x200 #define IDS_DEV_NOT_CONFIGURED 0x201
1 year, 1 month
1
0
0
0
[reactos] 01/01: [MSPAINT] Improve Zoom tool (#5781)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=62eeb158a5abef92d3dcc…
commit 62eeb158a5abef92d3dcc50f62395395df7f25f1 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Tue Oct 10 10:59:29 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Tue Oct 10 10:59:29 2023 +0900 [MSPAINT] Improve Zoom tool (#5781) - Delete CCanvasWindow::drawZoomFrame. - Invalidate the canvas on mouse move when the active tool is Zoom tool. - Add ZoomTool::OnDrawOverlayOnCanvas to draw the zoom rectangle without flickering. - Improve the zoom trackbar position. - Display the zoom rate on changing the value of the zoom trackbar. - Reverse the direction of the zoom trackbar. - Don't draw the focus rectangle. CORE-19215, CORE-19216 --- base/applications/mspaint/canvas.cpp | 23 ++------------- base/applications/mspaint/canvas.h | 1 - base/applications/mspaint/mouse.cpp | 15 ++++++++++ base/applications/mspaint/toolsettings.cpp | 47 +++++++++++++++++++++++------- base/applications/mspaint/toolsettings.h | 2 ++ 5 files changed, 57 insertions(+), 31 deletions(-) diff --git a/base/applications/mspaint/canvas.cpp b/base/applications/mspaint/canvas.cpp index ae860cb4d24..17eb2610ae2 100644 --- a/base/applications/mspaint/canvas.cpp +++ b/base/applications/mspaint/canvas.cpp @@ -29,18 +29,6 @@ CCanvasWindow::~CCanvasWindow() ::DeleteObject(m_ahbmCached[1]); } -VOID CCanvasWindow::drawZoomFrame(INT mouseX, INT mouseY) -{ - // FIXME: Draw the border of the area that is to be zoomed in - CRect rc; - GetImageRect(rc); - ImageToCanvas(rc); - - HDC hdc = GetDC(); - DrawXorRect(hdc, &rc); - ReleaseDC(hdc); -} - RECT CCanvasWindow::GetBaseRect() { CRect rcBase; @@ -376,6 +364,9 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; CanvasToImage(pt); + if (toolsModel.GetActiveTool() == TOOL_ZOOM) + Invalidate(); + if (m_hitSelection != HIT_NONE) { SelectionDragging(pt); @@ -384,14 +375,6 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL if (!m_drawing || toolsModel.GetActiveTool() <= TOOL_AIRBRUSH) { - if (toolsModel.GetActiveTool() == TOOL_ZOOM) - { - Invalidate(FALSE); - UpdateWindow(); - CanvasToImage(pt); - drawZoomFrame(pt.x, pt.y); - } - TRACKMOUSEEVENT tme = { sizeof(tme) }; tme.dwFlags = TME_LEAVE; tme.hwndTrack = m_hWnd; diff --git a/base/applications/mspaint/canvas.h b/base/applications/mspaint/canvas.h index dc26707be24..19920018214 100644 --- a/base/applications/mspaint/canvas.h +++ b/base/applications/mspaint/canvas.h @@ -62,7 +62,6 @@ protected: RECT GetBaseRect(); VOID DoDraw(HDC hDC, RECT& rcClient, RECT& rcPaint); VOID OnHVScroll(WPARAM wParam, INT fnBar); - VOID drawZoomFrame(INT mouseX, INT mouseY); HITTEST SelectionHitTest(POINT ptImage); VOID StartSelectionDrag(HITTEST hit, POINT ptImage); diff --git a/base/applications/mspaint/mouse.cpp b/base/applications/mspaint/mouse.cpp index 20a8e2157e4..4984ab63432 100644 --- a/base/applications/mspaint/mouse.cpp +++ b/base/applications/mspaint/mouse.cpp @@ -569,6 +569,21 @@ struct ZoomTool : ToolBase { } + void OnDrawOverlayOnCanvas(HDC hdc) override + { + CRect rc; + canvasWindow.GetImageRect(rc); + canvasWindow.ImageToCanvas(rc); + + POINT pt; + ::GetCursorPos(&pt); + ::ScreenToClient(canvasWindow, &pt); + + // FIXME: Draw the border of the area that is to be zoomed in + if (rc.PtInRect(pt)) + DrawXorRect(hdc, &rc); + } + void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override { if (bLeftButton) diff --git a/base/applications/mspaint/toolsettings.cpp b/base/applications/mspaint/toolsettings.cpp index 3d869848480..daf1bfc064e 100644 --- a/base/applications/mspaint/toolsettings.cpp +++ b/base/applications/mspaint/toolsettings.cpp @@ -21,6 +21,10 @@ #define MARGIN1 3 #define MARGIN2 2 +#define MAX_ZOOM_TRACK 6 +#define MIN_ZOOM_TRACK 0 +#define DEFAULT_ZOOM_TRACK 3 + static const BYTE s_AirRadius[4] = { 5, 8, 3, 12 }; CToolSettingsWindow toolSettingsWindow; @@ -285,10 +289,13 @@ LRESULT CToolSettingsWindow::OnCreate(UINT nMsg, WPARAM wParam, LPARAM lParam, W m_hTranspIcon = (HICON)LoadImage(g_hinstExe, MAKEINTRESOURCE(IDI_TRANSPARENT), IMAGE_ICON, CX_TRANS_ICON, CY_TRANS_ICON, LR_DEFAULTCOLOR); - RECT trackbarZoomPos = {1, 1, 1 + 40, 1 + 64}; + RECT trackbarZoomPos, rect2; + calculateTwoBoxes(trackbarZoomPos, rect2); + ::InflateRect(&trackbarZoomPos, -1, -1); + trackbarZoom.Create(TRACKBAR_CLASS, m_hWnd, trackbarZoomPos, NULL, WS_CHILD | TBS_VERT | TBS_AUTOTICKS); - trackbarZoom.SendMessage(TBM_SETRANGE, (WPARAM) TRUE, MAKELPARAM(0, 6)); - trackbarZoom.SendMessage(TBM_SETPOS, (WPARAM) TRUE, (LPARAM) 3); + trackbarZoom.SendMessage(TBM_SETRANGE, TRUE, MAKELPARAM(MIN_ZOOM_TRACK, MAX_ZOOM_TRACK)); + trackbarZoom.SendMessage(TBM_SETPOS, TRUE, DEFAULT_ZOOM_TRACK); return 0; } @@ -301,9 +308,30 @@ LRESULT CToolSettingsWindow::OnDestroy(UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT CToolSettingsWindow::OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - if (!zoomTo(125 << trackbarZoom.SendMessage(TBM_GETPOS, 0, 0), 0, 0)) + INT trackPos = MAX_ZOOM_TRACK - (INT)trackbarZoom.SendMessage(TBM_GETPOS, 0, 0); + zoomTo(MIN_ZOOM << trackPos, 0, 0); + + INT zoomRate = toolsModel.GetZoom(); + + CString strZoom; + if (zoomRate % 10 == 0) + strZoom.Format(_T("%d%%"), zoomRate / 10); + else + strZoom.Format(_T("%d.%d%%"), zoomRate / 10, zoomRate % 10); + + ::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM)(LPCTSTR)strZoom); + + OnToolsModelZoomChanged(nMsg, wParam, lParam, bHandled); + return 0; +} + +LRESULT CToolSettingsWindow::OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + NMHDR *pnmhdr = (NMHDR*)lParam; + if (pnmhdr->code == NM_CUSTOMDRAW) { - OnToolsModelZoomChanged(nMsg, wParam, lParam, bHandled); + NMCUSTOMDRAW *pCustomDraw = (NMCUSTOMDRAW*)pnmhdr; + pCustomDraw->uItemState &= ~CDIS_FOCUS; // Do not draw the focus } return 0; } @@ -330,9 +358,7 @@ LRESULT CToolSettingsWindow::OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BO PAINTSTRUCT ps; HDC hdc = BeginPaint(&ps); - if (toolsModel.GetActiveTool() == TOOL_ZOOM) - ::DrawEdge(hdc, &rect1, BDR_SUNKENOUTER, BF_RECT); - else + if (toolsModel.GetActiveTool() != TOOL_ZOOM) ::DrawEdge(hdc, &rect1, BDR_SUNKENOUTER, BF_RECT | BF_MIDDLE); if (toolsModel.GetActiveTool() >= TOOL_RECT) @@ -458,7 +484,7 @@ LRESULT CToolSettingsWindow::OnToolsModelSettingsChanged(UINT nMsg, WPARAM wPara LRESULT CToolSettingsWindow::OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { - int tbPos = 0; + int tbPos = MIN_ZOOM_TRACK; int tempZoom = toolsModel.GetZoom(); while (tempZoom > MIN_ZOOM) @@ -466,6 +492,7 @@ LRESULT CToolSettingsWindow::OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, L tbPos++; tempZoom = tempZoom >> 1; } - trackbarZoom.SendMessage(TBM_SETPOS, (WPARAM) TRUE, (LPARAM) tbPos); + + trackbarZoom.SendMessage(TBM_SETPOS, TRUE, MAX_ZOOM_TRACK - tbPos); return 0; } diff --git a/base/applications/mspaint/toolsettings.h b/base/applications/mspaint/toolsettings.h index 7b582256731..b6cc0482083 100644 --- a/base/applications/mspaint/toolsettings.h +++ b/base/applications/mspaint/toolsettings.h @@ -17,6 +17,7 @@ public: MESSAGE_HANDLER(WM_VSCROLL, OnVScroll) MESSAGE_HANDLER(WM_PAINT, OnPaint) MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown) + MESSAGE_HANDLER(WM_NOTIFY, OnNotify) MESSAGE_HANDLER(WM_TOOLSMODELTOOLCHANGED, OnToolsModelToolChanged) MESSAGE_HANDLER(WM_TOOLSMODELSETTINGSCHANGED, OnToolsModelSettingsChanged) MESSAGE_HANDLER(WM_TOOLSMODELZOOMCHANGED, OnToolsModelZoomChanged) @@ -43,6 +44,7 @@ private: LRESULT OnVScroll(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnPaint(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnNotify(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnToolsModelToolChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnToolsModelSettingsChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnToolsModelZoomChanged(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
1 year, 1 month
1
0
0
0
[reactos] 01/01: [MSPAINT] Check out of image in updating status bar (#5779)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0c164f081aa9330992a4f…
commit 0c164f081aa9330992a4f81a61a425d015f4d1c9 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Oct 9 08:39:31 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Oct 9 08:39:31 2023 +0900 [MSPAINT] Check out of image in updating status bar (#5779) Check out of the image by using ::PtInRect and CCanvasWindow::GetImageRect. If out, then don't show the status bar text. CORE-19219 --- base/applications/mspaint/canvas.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/applications/mspaint/canvas.cpp b/base/applications/mspaint/canvas.cpp index a4eeead446b..ae860cb4d24 100644 --- a/base/applications/mspaint/canvas.cpp +++ b/base/applications/mspaint/canvas.cpp @@ -400,8 +400,12 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL if (!m_drawing) { + RECT rcImage; + GetImageRect(rcImage); + CString strCoord; - strCoord.Format(_T("%ld, %ld"), pt.x, pt.y); + if (::PtInRect(&rcImage, pt)) + strCoord.Format(_T("%ld, %ld"), pt.x, pt.y); ::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord); } }
1 year, 1 month
1
0
0
0
[reactos] 01/01: [MSPAINT] Add border width to tool box (#5780)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=611d89eb8bf30edd09a1b…
commit 611d89eb8bf30edd09a1b3b41f3044fdb969093e Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Oct 9 08:37:31 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Oct 9 08:37:31 2023 +0900 [MSPAINT] Add border width to tool box (#5780) Make tool box pixel-perfect. Add two border widths to the tool box. CORE-19217 --- base/applications/mspaint/toolbox.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/applications/mspaint/toolbox.cpp b/base/applications/mspaint/toolbox.cpp index 54d5bd8c2a4..891093f3f77 100644 --- a/base/applications/mspaint/toolbox.cpp +++ b/base/applications/mspaint/toolbox.cpp @@ -34,7 +34,12 @@ CPaintToolBar::ToolBarWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam BOOL CPaintToolBar::DoCreate(HWND hwndParent) { // NOTE: The horizontal line above the toolbar is hidden by CCS_NODIVIDER style. - RECT toolbarPos = { 0, 0, CX_TOOLBAR, CY_TOOLBAR }; + RECT toolbarPos = + { + 0, 0, + CX_TOOLBAR + 2 * GetSystemMetrics(SM_CXBORDER), + CY_TOOLBAR + 2 * GetSystemMetrics(SM_CYBORDER) + }; DWORD style = WS_CHILD | WS_VISIBLE | CCS_NOPARENTALIGN | CCS_VERT | CCS_NORESIZE | TBSTYLE_TOOLTIPS | TBSTYLE_FLAT; if (!CWindow::Create(TOOLBARCLASSNAME, hwndParent, toolbarPos, NULL, style))
1 year, 1 month
1
0
0
0
[reactos] 01/01: [T2EMBED] Improve spec file
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63aef3e1fc8a9e549539a…
commit 63aef3e1fc8a9e549539a38cfb44e26436f7da2d Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Aug 6 14:43:56 2023 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Mon Oct 9 02:34:30 2023 +0300 [T2EMBED] Improve spec file - Only export stdcall annotated functions on x86 - Turn annotated stubs / forwarders into normal exports - Note: MSVC removes decorated exports / forwarders, as soon as the undecorated version is exported, even when _declspec(dllexport) is used, no idea how to fix that. --- dll/win32/t2embed/t2embed.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dll/win32/t2embed/t2embed.spec b/dll/win32/t2embed/t2embed.spec index 9b74715f081..6eae6be2f5d 100644 --- a/dll/win32/t2embed/t2embed.spec +++ b/dll/win32/t2embed/t2embed.spec @@ -9,17 +9,17 @@ @ stdcall TTIsEmbeddingEnabledForFacename(str ptr) @ stdcall TTLoadEmbeddedFont(ptr long ptr long ptr ptr ptr wstr str ptr) @ stdcall TTRunValidationTests(ptr ptr) -@ stub _TTCharToUnicode@24 -@ stub _TTDeleteEmbeddedFont@12 -@ stdcall _TTEmbedFont@44(long long long ptr ptr ptr ptr ptr long long ptr) TTEmbedFont -@ stub _TTEmbedFontFromFileA@52 -@ stub _TTEnableEmbeddingForFacename@8 -@ stub _TTGetEmbeddedFontInfo@28 -@ stdcall _TTGetEmbeddingType@8(long ptr) TTGetEmbeddingType -@ stdcall _TTIsEmbeddingEnabled@8(long ptr) TTIsEmbeddingEnabled -@ stdcall _TTIsEmbeddingEnabledForFacename@8(str ptr) TTIsEmbeddingEnabledForFacename -@ stdcall _TTLoadEmbeddedFont@40(ptr long ptr long ptr ptr ptr wstr str ptr) TTLoadEmbeddedFont -@ stub _TTRunValidationTests@8 +@ stdcall -i386 _TTCharToUnicode@24(ptr ptr long ptr long long) +@ stdcall -i386 _TTDeleteEmbeddedFont@12(long long ptr) +@ stdcall -i386 _TTEmbedFont@44(long long long ptr ptr ptr ptr ptr long long ptr) +@ stdcall -i386 _TTEmbedFontFromFileA@52(ptr str long long long ptr ptr ptr ptr ptr long long ptr) +@ stdcall -i386 _TTEnableEmbeddingForFacename@8(str long) +@ stdcall -i386 _TTGetEmbeddedFontInfo@28(long ptr long ptr ptr ptr ptr) +@ stdcall -i386 _TTGetEmbeddingType@8(long ptr) +@ stdcall -i386 _TTIsEmbeddingEnabled@8(long ptr) +@ stdcall -i386 _TTIsEmbeddingEnabledForFacename@8(str ptr) +@ stdcall -i386 _TTLoadEmbeddedFont@40(ptr long ptr long ptr ptr ptr wstr str ptr) +@ stdcall -i386 _TTRunValidationTests@8(ptr ptr) @ stdcall TTEmbedFontEx(ptr long long ptr ptr ptr ptr ptr long long ptr) @ stdcall TTRunValidationTestsEx(ptr ptr) @ stdcall TTGetNewFontName(ptr wstr long str long)
1 year, 1 month
1
0
0
0
[reactos] 01/01: [MSPAINT] Zoom tool shouldn't use undo buffer (#5778)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8d8f4d328c8d6a663107c…
commit 8d8f4d328c8d6a663107cfc6c28a554e3e60d71c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Mon Oct 9 08:07:02 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Mon Oct 9 08:07:02 2023 +0900 [MSPAINT] Zoom tool shouldn't use undo buffer (#5778) Remove PushImageForUndo call in Zoom tool. CORE-19214 --- base/applications/mspaint/mouse.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/base/applications/mspaint/mouse.cpp b/base/applications/mspaint/mouse.cpp index 8412cc027c0..20a8e2157e4 100644 --- a/base/applications/mspaint/mouse.cpp +++ b/base/applications/mspaint/mouse.cpp @@ -571,7 +571,6 @@ struct ZoomTool : ToolBase void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override { - imageModel.PushImageForUndo(); if (bLeftButton) { if (toolsModel.GetZoom() < MAX_ZOOM)
1 year, 1 month
1
0
0
0
[reactos] 02/02: [WSHTCPIP] Remove unneeded headers + Fix bugs.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=11b706429c9e817b03717…
commit 11b706429c9e817b03717fe09564a96f75c8702d Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Oct 7 22:12:34 2023 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Oct 8 17:11:26 2023 +0200 [WSHTCPIP] Remove unneeded headers + Fix bugs. - Mismatch NTSTATUS/DWORD for win32 errors; - Close handle returned from openTcpFile() with closeTcpFile(). --- dll/win32/wshtcpip/iflist.c | 40 +++++++++++++++++++--------------------- dll/win32/wshtcpip/wshtcpip.c | 2 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/dll/win32/wshtcpip/iflist.c b/dll/win32/wshtcpip/iflist.c index 637552f08d2..44c685a5ad5 100644 --- a/dll/win32/wshtcpip/iflist.c +++ b/dll/win32/wshtcpip/iflist.c @@ -8,9 +8,6 @@ #include "wshtcpip.h" -#define WIN32_NO_STATUS /* Tell Windows headers you'll use ntstatus.s from NDK */ -#include <windows.h> /* Declare Windows Headers like you normally would */ -#include <ntndk.h> /* Declare the NDK Headers */ #include <iptypes.h> #include <wine/list.h> @@ -29,7 +26,7 @@ BOOL AllocAndGetEntityArray( ULONG outBufLen, outBufLenNeeded; void* outBuf = NULL; TCP_REQUEST_QUERY_INFORMATION_EX inTcpReq; - NTSTATUS Status; + DWORD dwError; TDIEntityID *pEntities; /* Set up Request */ @@ -62,7 +59,7 @@ BOOL AllocAndGetEntityArray( if (outBuf == NULL) break; - Status = NO_ERROR; + dwError = NO_ERROR; if (!DeviceIoControl( TcpFile, IOCTL_TCP_QUERY_INFORMATION_EX, @@ -72,16 +69,18 @@ BOOL AllocAndGetEntityArray( outBufLen, &outBufLenNeeded, NULL)) - Status = GetLastError(); + { + dwError = GetLastError(); + } /* We need TDI_SUCCESS and the outBufLenNeeded must be equal or smaller than our buffer (outBufLen). */ - if (Status != NO_ERROR) + if (dwError != NO_ERROR) { HeapFree(hHeap, 0, outBuf); break; } - /* status = Success; was the buffer large enough? */ + /* dwError = Success; was the buffer large enough? */ if (outBufLenNeeded <= outBufLen) { result = TRUE; @@ -134,7 +133,7 @@ INT GetIPSNMPInfo( &BufLenNeeded, NULL)) { - DPRINT("DeviceIoControl (IPSNMPInfo) failed, Status %li!\n", GetLastError()); + DPRINT("DeviceIoControl (IPSNMPInfo) failed, Error %ld!\n", GetLastError()); return WSAEFAULT; } @@ -164,7 +163,7 @@ INT GetTdiEntityType( &BufLenNeeded, NULL)) { - DPRINT("DeviceIoControl (TdiEntityType) failed, Status %li!\n", GetLastError()); + DPRINT("DeviceIoControl (TdiEntityType) failed, Error %ld!\n", GetLastError()); return WSAEFAULT; } @@ -195,7 +194,7 @@ INT GetIFEntry( &BufLenNeeded, NULL)) { - DPRINT("DeviceIoControl (IFEntry) failed, Status %li!\n", GetLastError()); + DPRINT("DeviceIoControl (IFEntry) failed, Error %ld!\n", GetLastError()); return WSAEFAULT; } @@ -230,20 +229,20 @@ WSHIoctl_GetInterfaceList( DWORD outIDCount, i1, iAddr; DWORD bCastAddr, outNumberOfBytes; ULONG BufLenNeeded, BufLen, IFEntryLen, TdiType; - HANDLE TcpFile = 0; + HANDLE TcpFile = NULL; HANDLE hHeap = GetProcessHeap(); - DWORD LastErr; - INT res = -1; + NTSTATUS Status; + INT res; /* Init Interface-ID-List */ IntfIDList = HeapAlloc(hHeap, 0, sizeof(*IntfIDList)); list_init(&IntfIDList->entry); /* open tcp-driver */ - LastErr = openTcpFile(&TcpFile, FILE_READ_DATA | FILE_WRITE_DATA); - if (!NT_SUCCESS(LastErr)) + Status = openTcpFile(&TcpFile, FILE_READ_DATA | FILE_WRITE_DATA); + if (!NT_SUCCESS(Status)) { - res = (INT)LastErr; + res = RtlNtStatusToDosError(Status); goto cleanup; } @@ -330,8 +329,7 @@ WSHIoctl_GetInterfaceList( &BufLenNeeded, NULL)) { - LastErr = GetLastError(); - DPRINT("DeviceIoControl failed, Status %li!\n", LastErr); + DPRINT("DeviceIoControl failed, Error %ld!\n", GetLastError()); res = WSAEFAULT; goto cleanup; } @@ -426,8 +424,8 @@ WSHIoctl_GetInterfaceList( res = NO_ERROR; cleanup: DPRINT("WSHIoctl_GetInterfaceList - CLEANUP\n"); - if (TcpFile != 0) - NtClose(TcpFile); + if (TcpFile != NULL) + closeTcpFile(TcpFile); if (pIFEntry != NULL) HeapFree(hHeap, 0, pIFEntry); LIST_FOR_EACH_ENTRY_SAFE_REV(pIntfIDItem, pIntfIDNext, diff --git a/dll/win32/wshtcpip/wshtcpip.c b/dll/win32/wshtcpip/wshtcpip.c index a66166c2e8f..b1e822620b5 100644 --- a/dll/win32/wshtcpip/wshtcpip.c +++ b/dll/win32/wshtcpip/wshtcpip.c @@ -417,7 +417,7 @@ SendRequest( closeTcpFile(TcpCC); - DPRINT("DeviceIoControl: %ld\n", ((Success != FALSE) ? 0 : GetLastError())); + DPRINT("DeviceIoControl: %ld\n", (Success ? NO_ERROR : GetLastError())); if (!Success) return WSAEINVAL;
1 year, 1 month
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
13
14
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Results per page:
10
25
50
100
200