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 2023
----- 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
17 participants
89 discussions
Start a n
N
ew thread
[reactos] 01/01: [KBSWITCH] Delete SHLoadRegUIString hack (#5260)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7ee41e9e6091f3f18c6ef…
commit 7ee41e9e6091f3f18c6ef652c522f5207bb8f3fb Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Apr 29 07:28:56 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Apr 29 07:28:56 2023 +0900 [KBSWITCH] Delete SHLoadRegUIString hack (#5260) Because shlwapi!SHLoadRegUIString function is already implemented, so we don't need the hack any more. CORE-10667 --- base/applications/kbswitch/CMakeLists.txt | 2 +- base/applications/kbswitch/kbswitch.c | 51 +++++-------------------------- 2 files changed, 9 insertions(+), 44 deletions(-) diff --git a/base/applications/kbswitch/CMakeLists.txt b/base/applications/kbswitch/CMakeLists.txt index ede579f6181..9cf01e40398 100644 --- a/base/applications/kbswitch/CMakeLists.txt +++ b/base/applications/kbswitch/CMakeLists.txt @@ -2,7 +2,7 @@ add_rc_deps(kbswitch.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/kbswitch.ico) add_executable(kbswitch kbswitch.c kbswitch.rc) set_module_type(kbswitch win32gui UNICODE) -add_importlibs(kbswitch advapi32 imm32 user32 shell32 gdi32 msvcrt kernel32) +add_importlibs(kbswitch advapi32 imm32 user32 shell32 shlwapi gdi32 msvcrt kernel32) add_cd_file(TARGET kbswitch DESTINATION reactos/system32 FOR all) add_subdirectory(kbsdll) diff --git a/base/applications/kbswitch/kbswitch.c b/base/applications/kbswitch/kbswitch.c index 29f59db2f4c..984e2801bc3 100644 --- a/base/applications/kbswitch/kbswitch.c +++ b/base/applications/kbswitch/kbswitch.c @@ -8,6 +8,8 @@ */ #include "kbswitch.h" +#include <shlobj.h> +#include <shlwapi_undoc.h> #include <imm.h> /* @@ -96,11 +98,10 @@ static BOOL GetLayoutName(LPCTSTR szLayoutNum, LPTSTR szName, SIZE_T NameLength) { HKEY hKey; + HRESULT hr; DWORD dwBufLen; - TCHAR szBuf[MAX_PATH], szDispName[MAX_PATH], szIndex[MAX_PATH], szPath[MAX_PATH]; + TCHAR szBuf[MAX_PATH]; TCHAR szLCID[CCH_LAYOUT_ID + 1]; - HANDLE hLib; - UINT i, j, k; if (!GetLayoutID(szLayoutNum, szLCID, ARRAYSIZE(szLCID))) return FALSE; @@ -109,50 +110,14 @@ GetLayoutName(LPCTSTR szLayoutNum, LPTSTR szName, SIZE_T NameLength) _T("SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\%s"), szLCID); if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, szBuf, 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS) - { return FALSE; - } /* Use "Layout Display Name" value as an entry name if possible */ - dwBufLen = sizeof(szDispName); - if (RegQueryValueEx(hKey, _T("Layout Display Name"), NULL, NULL, - (LPBYTE)szDispName, &dwBufLen) == ERROR_SUCCESS) + hr = SHLoadRegUIString(hKey, _T("Layout Display Name"), szName, NameLength); + if (SUCCEEDED(hr)) { - /* FIXME: Use shlwapi!SHLoadRegUIStringW instead if it was implemented */ - if (szDispName[0] == '@') - { - size_t len = _tcslen(szDispName); - - for (i = 0; i < len; i++) - { - if ((szDispName[i] == ',') && (szDispName[i + 1] == '-')) - { - for (j = i + 2, k = 0; j < _tcslen(szDispName)+1; j++, k++) - { - szIndex[k] = szDispName[j]; - } - szDispName[i - 1] = '\0'; - break; - } - else szDispName[i] = szDispName[i + 1]; - } - - if (ExpandEnvironmentStrings(szDispName, szPath, ARRAYSIZE(szPath))) - { - hLib = LoadLibrary(szPath); - if (hLib) - { - if (LoadString(hLib, _ttoi(szIndex), szPath, ARRAYSIZE(szPath))) - { - StringCchCopy(szName, NameLength, szPath); - RegCloseKey(hKey); - FreeLibrary(hLib); - return TRUE; - } - FreeLibrary(hLib); - } - } - } + RegCloseKey(hKey); + return TRUE; } /* Otherwise, use "Layout Text" value as an entry name */
1 year, 7 months
1
0
0
0
[reactos] 01/01: [INPUT] Remove fake SHLoadRegUIStringW hack (#5258)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7eda556c645205795445f…
commit 7eda556c645205795445ff2794f1bdf508cb8e73 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Apr 29 07:27:54 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Apr 29 07:27:54 2023 +0900 [INPUT] Remove fake SHLoadRegUIStringW hack (#5258) Because shlwapi!SHLoadRegUIStringW function is already implemented, so we don't need the hack any more. CORE-11700 --- dll/cpl/input/layout_list.c | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/dll/cpl/input/layout_list.c b/dll/cpl/input/layout_list.c index 9d6622312ee..d3661a98f54 100644 --- a/dll/cpl/input/layout_list.c +++ b/dll/cpl/input/layout_list.c @@ -87,51 +87,8 @@ LayoutList_Destroy(VOID) typedef HRESULT (WINAPI *FN_SHLoadRegUIStringW)(HKEY, LPCWSTR, LPWSTR, DWORD); -/* FIXME: Use shlwapi!SHLoadRegUIStringW instead when it is fully implemented */ HRESULT FakeSHLoadRegUIStringW(HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size) { -#if 1 - PWCHAR pBuffer, pIndex; - WCHAR szDllPath[MAX_PATH]; - DWORD dwSize; - HINSTANCE hDllInst; - INT iIndex, iLength; - - dwSize = size * sizeof(WCHAR); - if (RegQueryValueExW(hkey, value, NULL, NULL, (LPBYTE)buf, &dwSize) != ERROR_SUCCESS) - return E_FAIL; - - if (buf[0] != L'@') - return S_OK; - - /* Move to the position after the character "@" */ - pBuffer = buf + 1; - - /* Get a pointer to the beginning ",-" */ - pIndex = wcsstr(pBuffer, L",-"); - if (!pIndex) - return E_FAIL; - - /* Convert the number in the string after the ",-" */ - iIndex = _wtoi(pIndex + 2); - - *pIndex = 0; /* Cut the string */ - - if (ExpandEnvironmentStringsW(pBuffer, szDllPath, ARRAYSIZE(szDllPath)) == 0) - return E_FAIL; - - hDllInst = LoadLibraryW(szDllPath); - if (!hDllInst) - return E_FAIL; - - iLength = LoadStringW(hDllInst, iIndex, buf, size); - FreeLibrary(hDllInst); - - if (iLength <= 0) - return E_FAIL; - - return S_OK; -#else HRESULT hr = E_FAIL; HINSTANCE hSHLWAPI = LoadLibraryW(L"shlwapi"); FN_SHLoadRegUIStringW fn; @@ -140,7 +97,6 @@ HRESULT FakeSHLoadRegUIStringW(HKEY hkey, LPCWSTR value, LPWSTR buf, DWORD size) hr = fn(hkey, value, buf, size); FreeLibrary(hSHLWAPI); return hr; -#endif } static BOOL
1 year, 7 months
1
0
0
0
[reactos] 01/01: [EXT2FS] Align with upstream and mark ReactOS diff (#5245)
by Vincent Franchomme
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aaeb131bd4e156effb5d5…
commit aaeb131bd4e156effb5d58246187cd18eedb4519 Author: Vincent Franchomme <franchomme.vincent(a)gmail.com> AuthorDate: Sun Apr 30 18:26:30 2023 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 30 18:26:30 2023 +0200 [EXT2FS] Align with upstream and mark ReactOS diff (#5245) NOTE: There are no new features in this PR, we stay with upstream version 0.69. CORE-18645 - Add ifdefs to distinguish ReactOS code/fixes from the upstream code; - If upstream code was overriden, reintroduce it in #else section; - Re-align .rc version info with upstream (0.69). --- drivers/filesystems/ext2/inc/common.h | 5 + drivers/filesystems/ext2/inc/ext2fs.h | 160 +++++++++++++++++++++-- drivers/filesystems/ext2/inc/linux/module.h | 12 +- drivers/filesystems/ext2/inc/linux/types.h | 4 + drivers/filesystems/ext2/src/block.c | 24 ++++ drivers/filesystems/ext2/src/cmcb.c | 24 ++++ drivers/filesystems/ext2/src/devctl.c | 24 ++++ drivers/filesystems/ext2/src/dispatch.c | 16 +++ drivers/filesystems/ext2/src/ext2.rc | 16 +-- drivers/filesystems/ext2/src/ext3/generic.c | 74 +++++++++++ drivers/filesystems/ext2/src/ext3/indirect.c | 28 ++++ drivers/filesystems/ext2/src/ext4/ext4_extents.c | 23 +++- drivers/filesystems/ext2/src/ext4/ext4_jbd2.c | 4 + drivers/filesystems/ext2/src/fastio.c | 68 ++++++++++ drivers/filesystems/ext2/src/fileinfo.c | 7 +- drivers/filesystems/ext2/src/flush.c | 4 + drivers/filesystems/ext2/src/init.c | 17 ++- drivers/filesystems/ext2/src/linux.c | 8 ++ drivers/filesystems/ext2/src/memory.c | 28 ++++ drivers/filesystems/ext2/src/pnp.c | 8 ++ drivers/filesystems/ext2/src/write.c | 16 +++ 21 files changed, 542 insertions(+), 28 deletions(-) diff --git a/drivers/filesystems/ext2/inc/common.h b/drivers/filesystems/ext2/inc/common.h index 78ec730aab0..3fd4eff4a38 100644 --- a/drivers/filesystems/ext2/inc/common.h +++ b/drivers/filesystems/ext2/inc/common.h @@ -196,8 +196,13 @@ typedef struct _EXT2_VOLUME_PROPERTY2 { } EXT2_VOLUME_PROPERTY2, *PEXT2_VOLUME_PROPERTY2; +#ifdef __REACTOS__ #define EXT2_VPROP3_AUTOMOUNT (1ULL << 0) #define EXT2_VPROP3_USERIDS (1ULL << 1) +#else +#define EXT2_VPROP3_AUTOMOUNT (1ui64 << 0) +#define EXT2_VPROP3_USERIDS (1ui64 << 1) +#endif #ifdef __cplusplus typedef struct _EXT2_VOLUME_PROPERTY3:EXT2_VOLUME_PROPERTY2 { diff --git a/drivers/filesystems/ext2/inc/ext2fs.h b/drivers/filesystems/ext2/inc/ext2fs.h index 3cf098635dc..fd5b62be609 100644 --- a/drivers/filesystems/ext2/inc/ext2fs.h +++ b/drivers/filesystems/ext2/inc/ext2fs.h @@ -223,8 +223,13 @@ _InterlockedXor ( #if EXT2_DEBUG +#ifdef __REACTOS__ #define SetLongFlag(_F,_SF) Ext2SetFlag((PULONG)&(_F), (ULONG)(_SF)) #define ClearLongFlag(_F,_SF) Ext2ClearFlag((PULONG)&(_F), (ULONG)(_SF)) +#else +#define SetLongFlag(_F,_SF) Ext2SetFlag(&(_F), (ULONG)(_SF)) +#define ClearLongFlag(_F,_SF) Ext2ClearFlag(&(_F), (ULONG)(_SF)) +#endif #ifdef __REACTOS__ static @@ -489,7 +494,11 @@ typedef PVOID PBCB; // Data that is not specific to a mounted volume // +#ifdef __REACTOS__ typedef VOID (NTAPI *EXT2_REAPER_RELEASE)(PVOID); +#else +typedef VOID (*EXT2_REAPER_RELEASE)(PVOID); +#endif typedef struct _EXT2_REAPER { PETHREAD Thread; @@ -1276,34 +1285,62 @@ Ext2Close (IN PEXT2_IRP_CONTEXT IrpContext); VOID Ext2QueueCloseRequest (IN PEXT2_IRP_CONTEXT IrpContext); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2DeQueueCloseRequest (IN PVOID Context); // // Cmcb.c // +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2AcquireForLazyWrite ( IN PVOID Context, IN BOOLEAN Wait ); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2ReleaseFromLazyWrite (IN PVOID Context); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2AcquireForReadAhead ( IN PVOID Context, IN BOOLEAN Wait ); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2ReleaseFromReadAhead (IN PVOID Context); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2NoOpAcquire ( IN PVOID Fcb, IN BOOLEAN Wait ); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2NoOpRelease (IN PVOID Fcb); // @@ -1589,13 +1626,21 @@ Ext2IsDirectoryEmpty ( // Dispatch.c // +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2OplockComplete ( IN PVOID Context, IN PIRP Irp ); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2LockIrp ( IN PVOID Context, IN PIRP Irp @@ -1604,13 +1649,21 @@ Ext2LockIrp ( NTSTATUS Ext2QueueRequest (IN PEXT2_IRP_CONTEXT IrpContext); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2DeQueueRequest (IN PVOID Context); NTSTATUS Ext2DispatchRequest (IN PEXT2_IRP_CONTEXT IrpContext); +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2BuildRequest ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp @@ -2062,7 +2115,11 @@ Ext2IsFastIoPossible( IN PEXT2_FCB Fcb ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoCheckIfPossible ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -2075,7 +2132,11 @@ Ext2FastIoCheckIfPossible ( ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoRead (IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, @@ -2085,7 +2146,11 @@ Ext2FastIoRead (IN PFILE_OBJECT FileObject, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoWrite ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -2096,7 +2161,11 @@ Ext2FastIoWrite ( OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryBasicInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -2104,7 +2173,11 @@ Ext2FastIoQueryBasicInfo ( OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryStandardInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -2112,7 +2185,11 @@ Ext2FastIoQueryStandardInfo ( OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoLock ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -2125,7 +2202,11 @@ Ext2FastIoLock ( IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoUnlockSingle ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -2136,7 +2217,11 @@ Ext2FastIoUnlockSingle ( IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoUnlockAll ( IN PFILE_OBJECT FileObject, IN PEPROCESS Process, @@ -2144,7 +2229,11 @@ Ext2FastIoUnlockAll ( IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoUnlockAllByKey ( IN PFILE_OBJECT FileObject, #ifdef __REACTOS__ @@ -2158,7 +2247,11 @@ Ext2FastIoUnlockAllByKey ( ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryNetworkOpenInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -2166,7 +2259,11 @@ Ext2FastIoQueryNetworkOpenInfo ( OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryNetworkOpenInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -2174,20 +2271,29 @@ Ext2FastIoQueryNetworkOpenInfo ( OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject); +#ifdef __REACTOS__ +VOID NTAPI +#else VOID -NTAPI +#endif Ext2AcquireForCreateSection ( IN PFILE_OBJECT FileObject ); +#ifdef __REACTOS__ +VOID NTAPI +#else VOID -NTAPI +#endif Ext2ReleaseForCreateSection ( IN PFILE_OBJECT FileObject ); +#ifdef __REACTOS__ +NTSTATUS NTAPI +#else NTSTATUS -NTAPI +#endif Ext2AcquireFileForModWrite ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER EndingOffset, @@ -2195,31 +2301,43 @@ Ext2AcquireFileForModWrite ( IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ +NTSTATUS NTAPI +#else NTSTATUS -NTAPI +#endif Ext2ReleaseFileForModWrite ( IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease, IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ +NTSTATUS NTAPI +#else NTSTATUS -NTAPI +#endif Ext2AcquireFileForCcFlush ( IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ +NTSTATUS NTAPI +#else NTSTATUS -NTAPI +#endif Ext2ReleaseFileForCcFlush ( IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject ); +#ifdef __REACTOS__ +NTSTATUS NTAPI +#else NTSTATUS -NTAPI +#endif Ext2PreAcquireForCreateSection( IN PFS_FILTER_CALLBACK_DATA cd, OUT PVOID *cc @@ -2521,7 +2639,11 @@ Ext2QueryGlobalParameters(IN PUNICODE_STRING RegistryPath); BOOLEAN Ext2QueryRegistrySettings(IN PUNICODE_STRING RegistryPath); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif DriverUnload (IN PDRIVER_OBJECT DriverObject); // @@ -2581,20 +2703,29 @@ Ext2LockControl (IN PEXT2_IRP_CONTEXT IrpContext); // Memory.c // +#ifdef __REACTOS__ +VOID NTAPI +#else VOID -NTAPI +#endif Ext2FcbReaperThread( PVOID Context ); +#ifdef __REACTOS__ +VOID NTAPI +#else VOID -NTAPI +#endif Ext2McbReaperThread( PVOID Context ); +#ifdef __REACTOS__ +VOID NTAPI +#else VOID -NTAPI +#endif Ext2bhReaperThread( PVOID Context ); @@ -2900,15 +3031,22 @@ Ext2FirstUnusedMcb( ULONG Number ); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2ReaperThread( PVOID Context ); NTSTATUS Ext2StartReaper(PEXT2_REAPER, EXT2_REAPER_RELEASE); +#ifdef __REACTOS__ +VOID NTAPI +#else VOID -NTAPI +#endif Ext2StopReaper(PEXT2_REAPER Reaper); // diff --git a/drivers/filesystems/ext2/inc/linux/module.h b/drivers/filesystems/ext2/inc/linux/module.h index f16b8b7bb23..ef80e4072a7 100644 --- a/drivers/filesystems/ext2/inc/linux/module.h +++ b/drivers/filesystems/ext2/inc/linux/module.h @@ -59,7 +59,8 @@ extern "C" { #define RtlUlongByteSwap(_x) _byteswap_ulong((_x)) #define RtlUlonglongByteSwap(_x) _byteswap_uint64((_x)) -#elif !defined(__REACTOS__) +#else +#ifndef __REACTOS__ USHORT FASTCALL @@ -78,6 +79,7 @@ FASTCALL RtlUlonglongByteSwap( IN ULONGLONG Source ); +#endif //#ifndef __REACTOS__ #endif #define __swab16(x) RtlUshortByteSwap(x) @@ -429,10 +431,18 @@ extern struct task_struct *current; // +#ifdef __REACTOS__ static inline int cond_resched() { +#else +static inline cond_resched() { +#endif return FALSE; } +#ifdef __REACTOS__ static inline int need_resched() { +#else +static inline need_resched() { +#endif return FALSE; } diff --git a/drivers/filesystems/ext2/inc/linux/types.h b/drivers/filesystems/ext2/inc/linux/types.h index 32bd1c6a518..ef6156c0492 100644 --- a/drivers/filesystems/ext2/inc/linux/types.h +++ b/drivers/filesystems/ext2/inc/linux/types.h @@ -27,14 +27,18 @@ typedef signed __int64 __s64; typedef unsigned __int64 __u64; +#ifdef __REACTOS__ typedef __s8 s8; typedef __u8 u8; +#endif +#if defined(_MSC_VER) || defined(__REACTOS__) typedef __s16 s16; typedef __u16 u16; typedef __s32 s32; typedef __u32 u32; typedef __s64 s64; typedef __u64 u64; +#endif #define __le16 u16 #define __le32 u32 diff --git a/drivers/filesystems/ext2/src/block.c b/drivers/filesystems/ext2/src/block.c index bddb55e8eee..0ae933b0b93 100644 --- a/drivers/filesystems/ext2/src/block.c +++ b/drivers/filesystems/ext2/src/block.c @@ -17,20 +17,32 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2ReadWriteBlockSyncCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context ); +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2ReadWriteBlockAsyncCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context ); +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2MediaEjectControlCompletion ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -148,7 +160,11 @@ Ext2GetUserBuffer (IN PIRP Irp ) } } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2ReadWriteBlockSyncCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -181,7 +197,11 @@ Ext2ReadWriteBlockSyncCompletionRoutine ( return STATUS_MORE_PROCESSING_REQUIRED; } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2ReadWriteBlockAsyncCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -641,7 +661,11 @@ Ext2DiskIoControl ( } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2MediaEjectControlCompletion ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, diff --git a/drivers/filesystems/ext2/src/cmcb.c b/drivers/filesystems/ext2/src/cmcb.c index 2c0d1874049..1d82d022f03 100644 --- a/drivers/filesystems/ext2/src/cmcb.c +++ b/drivers/filesystems/ext2/src/cmcb.c @@ -19,7 +19,11 @@ extern PEXT2_GLOBAL Ext2Global; #define CMCB_DEBUG_LEVEL DL_NVR +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2AcquireForLazyWrite ( IN PVOID Context, IN BOOLEAN Wait) @@ -51,7 +55,11 @@ Ext2AcquireForLazyWrite ( return TRUE; } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2ReleaseFromLazyWrite (IN PVOID Context) { // @@ -76,7 +84,11 @@ Ext2ReleaseFromLazyWrite (IN PVOID Context) IoSetTopLevelIrp( NULL ); } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2AcquireForReadAhead (IN PVOID Context, IN BOOLEAN Wait) { @@ -97,7 +109,11 @@ Ext2AcquireForReadAhead (IN PVOID Context, return TRUE; } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2ReleaseFromReadAhead (IN PVOID Context) { PEXT2_FCB Fcb = (PEXT2_FCB) Context; @@ -114,7 +130,11 @@ Ext2ReleaseFromReadAhead (IN PVOID Context) ExReleaseResourceLite(Fcb->Header.Resource); } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2NoOpAcquire ( IN PVOID Fcb, IN BOOLEAN Wait @@ -125,7 +145,11 @@ Ext2NoOpAcquire ( return TRUE; } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2NoOpRelease ( IN PVOID Fcb ) diff --git a/drivers/filesystems/ext2/src/devctl.c b/drivers/filesystems/ext2/src/devctl.c index 1114989db02..d986d07bc09 100644 --- a/drivers/filesystems/ext2/src/devctl.c +++ b/drivers/filesystems/ext2/src/devctl.c @@ -17,7 +17,11 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2DeviceControlCompletion ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -38,7 +42,11 @@ Ext2DeviceControlCompletion ( #endif +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2DeviceControlCompletion ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -426,14 +434,22 @@ Ext2ProcessVolumeProperty( case APP_CMD_SET_PROPERTY2: RtlZeroMemory(Vcb->sHidingPrefix, HIDINGPAT_LEN); +#ifdef __REACTOS__ if (Vcb->bHidingPrefix == Property2->bHidingPrefix) { +#else + if (Vcb->bHidingPrefix = Property2->bHidingPrefix) { +#endif RtlCopyMemory( Vcb->sHidingPrefix, Property2->sHidingPrefix, HIDINGPAT_LEN - 1); } RtlZeroMemory(Vcb->sHidingSuffix, HIDINGPAT_LEN); +#ifdef __REACTOS__ if (Vcb->bHidingSuffix == Property2->bHidingSuffix) { +#else + if (Vcb->bHidingSuffix = Property2->bHidingSuffix) { +#endif RtlCopyMemory( Vcb->sHidingSuffix, Property2->sHidingSuffix, HIDINGPAT_LEN - 1); @@ -511,7 +527,11 @@ Ext2ProcessVolumeProperty( RtlCopyMemory(Property2->UUID, Vcb->SuperBlock->s_uuid, 16); Property2->DrvLetter = Vcb->DrvLetter; +#ifdef __REACTOS__ if (Property2->bHidingPrefix == Vcb->bHidingPrefix) { +#else + if (Property2->bHidingPrefix = Vcb->bHidingPrefix) { +#endif RtlCopyMemory( Property2->sHidingPrefix, Vcb->sHidingPrefix, HIDINGPAT_LEN); @@ -520,7 +540,11 @@ Ext2ProcessVolumeProperty( HIDINGPAT_LEN); } +#ifdef __REACTOS__ if (Property2->bHidingSuffix == Vcb->bHidingSuffix) { +#else + if (Property2->bHidingSuffix = Vcb->bHidingSuffix) { +#endif RtlCopyMemory( Property2->sHidingSuffix, Vcb->sHidingSuffix, HIDINGPAT_LEN); diff --git a/drivers/filesystems/ext2/src/dispatch.c b/drivers/filesystems/ext2/src/dispatch.c index 5b278714b41..8246e32718f 100644 --- a/drivers/filesystems/ext2/src/dispatch.c +++ b/drivers/filesystems/ext2/src/dispatch.c @@ -37,7 +37,11 @@ extern PEXT2_GLOBAL Ext2Global; * N/A */ +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2OplockComplete ( IN PVOID Context, IN PIRP Irp @@ -82,7 +86,11 @@ Ext2OplockComplete ( * N/A */ +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2LockIrp ( IN PVOID Context, IN PIRP Irp @@ -174,7 +182,11 @@ Ext2QueueRequest (IN PEXT2_IRP_CONTEXT IrpContext) } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2DeQueueRequest (IN PVOID Context) { PEXT2_IRP_CONTEXT IrpContext; @@ -288,7 +300,11 @@ Ext2DispatchRequest (IN PEXT2_IRP_CONTEXT IrpContext) } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2BuildRequest (PDEVICE_OBJECT DeviceObject, PIRP Irp) { BOOLEAN AtIrqlPassiveLevel = FALSE; diff --git a/drivers/filesystems/ext2/src/ext2.rc b/drivers/filesystems/ext2/src/ext2.rc index 3e53be1f80e..8cbe4bcc206 100644 --- a/drivers/filesystems/ext2/src/ext2.rc +++ b/drivers/filesystems/ext2/src/ext2.rc @@ -62,8 +62,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,6,2,0 - PRODUCTVERSION 0,6,2,0 + FILEVERSION 0,69,11,1 + PRODUCTVERSION 0,69,11,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x29L @@ -79,16 +79,16 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", "Ext2 File System Driver\0" - VALUE "CompanyName", "Purayidathil\0" - VALUE "FileDescription", "Ext2 File System Driver\0" - VALUE "FileVersion", "0, 6, 2, 0\0" + VALUE "CompanyName", "
www.ext2fsd.com\0
" + VALUE "FileDescription", "Ext2 File System Driver for Windows\0" + VALUE "FileVersion", "0.69.11.1\0" VALUE "InternalName", "ext2fs.sys\0" - VALUE "LegalCopyright", "Copyright © 2015 Matt Wu\0" + VALUE "LegalCopyright", "GPLv2\0" VALUE "LegalTrademarks", " - \0" VALUE "OriginalFilename", "ext2fs.sys\0" VALUE "PrivateBuild", " - \0" - VALUE "ProductName", "Ext2 File System Driver for Windows\0" - VALUE "ProductVersion", "0, 6, 2, 0\0" + VALUE "ProductName", "Ext2 File System Driver\0" + VALUE "ProductVersion", "0.69.11.1\0" VALUE "SpecialBuild", " - \0" END END diff --git a/drivers/filesystems/ext2/src/ext3/generic.c b/drivers/filesystems/ext2/src/ext3/generic.c index 0140e930860..34d824d2cec 100644 --- a/drivers/filesystems/ext2/src/ext3/generic.c +++ b/drivers/filesystems/ext2/src/ext3/generic.c @@ -10,7 +10,11 @@ /* INCLUDES *****************************************************************/ #include "ext2fs.h" +#ifdef __REACTOS__ #include "linux/ext4.h" +#else +#include "linux\ext4.h" +#endif /* GLOBALS ***************************************************************/ @@ -858,6 +862,7 @@ Ext2ZeroBuffer( IN PEXT2_IRP_CONTEXT IrpContext, } +#ifdef __REACTOS__ #define SIZE_256K 0x40000 BOOLEAN @@ -917,6 +922,75 @@ Ext2SaveBuffer( IN PEXT2_IRP_CONTEXT IrpContext, return rc; } +#else + +BOOLEAN +Ext2SaveBuffer( IN PEXT2_IRP_CONTEXT IrpContext, + IN PEXT2_VCB Vcb, + IN LONGLONG offset, + IN ULONG size, + IN PVOID buf ) +{ + struct buffer_head *bh = NULL; + BOOLEAN rc = 0; + + __try { + + while (size) { + + sector_t block; + ULONG len = 0, delta = 0; + + block = (sector_t) (offset >> BLOCK_BITS); + delta = (ULONG)offset & (BLOCK_SIZE - 1); + len = BLOCK_SIZE - delta; + if (size < len) + len = size; + + if (delta == 0 && len >= BLOCK_SIZE) { + bh = sb_getblk_zero(&Vcb->sb, block); + } else { + bh = sb_getblk(&Vcb->sb, block); + } + + if (!bh) { + DEBUG(DL_ERR, ("Ext2SaveBuffer: can't load block %I64u\n", block)); + DbgBreak(); + __leave; + } + + if (!buffer_uptodate(bh)) { + int err = bh_submit_read(bh); + if (err < 0) { + DEBUG(DL_ERR, ("Ext2SaveBuffer: bh_submit_read failed: %d\n", err)); + __leave; + } + } + + __try { + RtlCopyMemory(bh->b_data + delta, buf, len); + mark_buffer_dirty(bh); + } __finally { + fini_bh(&bh); + } + + buf = (PUCHAR)buf + len; + offset = offset + len; + size = size - len; + } + + rc = TRUE; + + } __finally { + + if (bh) + fini_bh(&bh); + + } + + return rc; +} +#endif VOID diff --git a/drivers/filesystems/ext2/src/ext3/indirect.c b/drivers/filesystems/ext2/src/ext3/indirect.c index f770c85cea7..f59d71cafa7 100644 --- a/drivers/filesystems/ext2/src/ext3/indirect.c +++ b/drivers/filesystems/ext2/src/ext3/indirect.c @@ -219,7 +219,11 @@ Ext2GetBlock( BLOCK_SIZE, PIN_WAIT, &Bcb, +#ifdef __REACTOS__ (void **)&pData )) { +#else + &pData )) { +#endif DEBUG(DL_ERR, ( "Ext2GetBlock: Failed to PinLock block: %xh ...\n", BlockArray[0] )); @@ -521,7 +525,11 @@ Ext2ExpandBlock( BLOCK_SIZE, PIN_WAIT, &Bcb, +#ifdef __REACTOS__ (void **)&pData )) { +#else + &pData )) { +#endif DEBUG(DL_ERR, ( "Ext2ExpandInode: failed to PinLock offset :%I64xh...\n", Offset.QuadPart)); @@ -726,7 +734,11 @@ Ext2TruncateBlock( BLOCK_SIZE, PIN_WAIT, &Bcb, +#ifdef __REACTOS__ (void **)&pData )) { +#else + &pData )) { +#endif DEBUG(DL_ERR, ( "Ext2TruncateBlock: PinLock failed on block %xh ...\n", BlockArray[SizeArray - i - 1])); @@ -906,7 +918,11 @@ Ext2MapIndirect( Layer, Index, dwArray, +#ifdef __REACTOS__ (PULONG)&Mcb->Inode.i_block[Slot], +#else + &Mcb->Inode.i_block[Slot], +#endif bAlloc, &dwHint, &dwRet, @@ -987,7 +1003,11 @@ Ext2ExpandIndirect( Layer, Start, (Layer == 0) ? (Vcb->max_blocks_per_layer[Layer] - Start) : 1, +#ifdef __REACTOS__ (PULONG)&Mcb->Inode.i_block[Slot], +#else + &Mcb->Inode.i_block[Slot], +#endif &Hint, &Extra ); @@ -1118,11 +1138,19 @@ Ext2TruncateIndirect( Base -= Vcb->max_blocks_per_layer[Layer - 1]; if (Layer - 1 == 0) { +#ifdef __REACTOS__ BlockArray = (PULONG)&Mcb->Inode.i_block[0]; +#else + BlockArray = &Mcb->Inode.i_block[0]; +#endif SizeArray = End; ASSERT(End == EXT2_NDIR_BLOCKS && Base == 0); } else { +#ifdef __REACTOS__ BlockArray = (PULONG)&Mcb->Inode.i_block[EXT2_NDIR_BLOCKS - 1 + Layer - 1]; +#else + BlockArray = &Mcb->Inode.i_block[EXT2_NDIR_BLOCKS - 1 + Layer - 1]; +#endif SizeArray = 1; } diff --git a/drivers/filesystems/ext2/src/ext4/ext4_extents.c b/drivers/filesystems/ext2/src/ext4/ext4_extents.c index 68743f0c182..b58278c7766 100644 --- a/drivers/filesystems/ext2/src/ext4/ext4_extents.c +++ b/drivers/filesystems/ext2/src/ext4/ext4_extents.c @@ -14,9 +14,13 @@ */ #include "ext2fs.h" -#include <linux/ext4.h> +#ifdef __REACTOS__ +#include "linux/ext4.h" +#else +#include "linux\ext4.h" +#endif -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(__REACTOS__) #pragma warning(push) #pragma warning(disable: 4018) #pragma warning(disable: 4242) @@ -83,10 +87,16 @@ static inline void ext_debug(char *str, ...) { } #if TRUE +#ifdef __REACTOS__ #define EXT4_ERROR_INODE(inode, str, ...) do { \ DbgPrint("inode[%p]: " str "\n", inode, ##__VA_ARGS__); \ } while(0) #else +#define EXT4_ERROR_INODE(inode, str, ...) do { \ + DbgPrint("inode[%p]: "##str "\n", inode, __VA_ARGS__); \ + } while(0) +#endif +#else #define EXT4_ERROR_INODE #endif @@ -395,6 +405,7 @@ static int __ext4_ext_check(const char *function, unsigned int line, #ifndef __REACTOS__ int max = 0; #endif + if (eh->eh_magic != EXT4_EXT_MAGIC) { error_msg = "invalid magic"; goto corrupted; @@ -2175,10 +2186,10 @@ fix_extent_len: /* * returns 1 if current index have to be freed (even partial) */ -#ifndef __REACTOS__ -static int inline -#else +#ifdef __REACTOS__ inline int +#else +static int inline #endif ext4_ext_more_to_rm(struct ext4_ext_path *path) { @@ -2517,7 +2528,7 @@ int ext4_ext_truncate(void *icb, struct inode *inode, unsigned long start) return ret; } -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(__REACTOS__) #pragma warning(pop) #endif diff --git a/drivers/filesystems/ext2/src/ext4/ext4_jbd2.c b/drivers/filesystems/ext2/src/ext4/ext4_jbd2.c index 86636905180..ddc425ceaf7 100644 --- a/drivers/filesystems/ext2/src/ext4/ext4_jbd2.c +++ b/drivers/filesystems/ext2/src/ext4/ext4_jbd2.c @@ -1,5 +1,9 @@ #include "ext2fs.h" +#ifdef __REACTOS__ #include "linux/ext4.h" +#else +#include "linux\ext4.h" +#endif static handle_t no_journal; diff --git a/drivers/filesystems/ext2/src/fastio.c b/drivers/filesystems/ext2/src/fastio.c index ea62543bfe0..2eefedabe76 100644 --- a/drivers/filesystems/ext2/src/fastio.c +++ b/drivers/filesystems/ext2/src/fastio.c @@ -56,7 +56,11 @@ Ext2IsFastIoPossible( } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoCheckIfPossible ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -160,7 +164,11 @@ Ext2FastIoCheckIfPossible ( } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoRead (IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, @@ -191,7 +199,11 @@ Ext2FastIoRead (IN PFILE_OBJECT FileObject, return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoWrite ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -260,7 +272,11 @@ Ext2FastIoWrite ( return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryBasicInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -372,7 +388,11 @@ Ext2FastIoQueryBasicInfo ( return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryStandardInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -489,7 +509,11 @@ Ext2FastIoQueryStandardInfo ( return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoLock ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -597,7 +621,11 @@ Ext2FastIoLock ( return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoUnlockSingle ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, @@ -700,7 +728,11 @@ Ext2FastIoUnlockSingle ( return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoUnlockAll ( IN PFILE_OBJECT FileObject, IN PEPROCESS Process, @@ -791,7 +823,11 @@ Ext2FastIoUnlockAll ( return Status; } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoUnlockAllByKey ( IN PFILE_OBJECT FileObject, #ifdef __REACTOS__ @@ -898,7 +934,11 @@ Ext2FastIoUnlockAllByKey ( } +#ifdef __REACTOS__ BOOLEAN NTAPI +#else +BOOLEAN +#endif Ext2FastIoQueryNetworkOpenInfo ( IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, @@ -995,7 +1035,11 @@ Ext2FastIoQueryNetworkOpenInfo ( } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2AcquireForCreateSection ( IN PFILE_OBJECT FileObject ) @@ -1010,7 +1054,11 @@ Ext2AcquireForCreateSection ( DEBUG(FASTIO_DEBUG_LEVEL, ("Ext2AcquireForCreateSection: Fcb=%p\n", Fcb)); } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2ReleaseForCreateSection ( IN PFILE_OBJECT FileObject ) @@ -1025,7 +1073,11 @@ Ext2ReleaseForCreateSection ( } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2AcquireFileForModWrite ( IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER EndingOffset, @@ -1050,7 +1102,11 @@ Ext2AcquireFileForModWrite ( return (ResourceAcquired ? STATUS_SUCCESS : STATUS_CANT_WAIT); } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2ReleaseFileForModWrite ( IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease, @@ -1071,7 +1127,11 @@ Ext2ReleaseFileForModWrite ( return STATUS_SUCCESS; } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2AcquireFileForCcFlush ( IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject @@ -1088,7 +1148,11 @@ Ext2AcquireFileForCcFlush ( return STATUS_SUCCESS; } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2ReleaseFileForCcFlush ( IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject @@ -1106,7 +1170,11 @@ Ext2ReleaseFileForCcFlush ( } +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2PreAcquireForCreateSection( IN PFS_FILTER_CALLBACK_DATA cd, OUT PVOID *cc diff --git a/drivers/filesystems/ext2/src/fileinfo.c b/drivers/filesystems/ext2/src/fileinfo.c index 61ee0c8ef8c..5871fd19fb6 100644 --- a/drivers/filesystems/ext2/src/fileinfo.c +++ b/drivers/filesystems/ext2/src/fileinfo.c @@ -10,8 +10,13 @@ /* INCLUDES *****************************************************************/ #include "ext2fs.h" -#include <linux/ext4.h> +#ifdef __REACTOS__ +#include "linux/ext4.h" #include "linux/ext4_xattr.h" +#else +#include "linux\ext4.h" +#include "linux\ext4_xattr.h" +#endif /* GLOBALS ***************************************************************/ diff --git a/drivers/filesystems/ext2/src/flush.c b/drivers/filesystems/ext2/src/flush.c index c3e3dcd1625..2172c0a5756 100644 --- a/drivers/filesystems/ext2/src/flush.c +++ b/drivers/filesystems/ext2/src/flush.c @@ -18,7 +18,11 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2FlushCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, diff --git a/drivers/filesystems/ext2/src/init.c b/drivers/filesystems/ext2/src/init.c index 4e968de423e..6c657d69917 100644 --- a/drivers/filesystems/ext2/src/init.c +++ b/drivers/filesystems/ext2/src/init.c @@ -26,7 +26,11 @@ CHAR gDate[] = __DATE__; /* DEFINITIONS ***********************************************************/ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath ); @@ -53,8 +57,11 @@ DECLARE_EXIT(journal_exit); * DriverObject = object describing this driver * RETURNS: None */ - +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif DriverUnload (IN PDRIVER_OBJECT DriverObject) { @@ -100,7 +107,11 @@ DriverUnload (IN PDRIVER_OBJECT DriverObject) #endif +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2RegistryQueryCallback( IN PWSTR ValueName, IN ULONG ValueType, @@ -449,7 +460,11 @@ Ext2EresourceAlignmentChecking() * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif DriverEntry ( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath diff --git a/drivers/filesystems/ext2/src/linux.c b/drivers/filesystems/ext2/src/linux.c index 85975c3515e..a7e6a795831 100644 --- a/drivers/filesystems/ext2/src/linux.c +++ b/drivers/filesystems/ext2/src/linux.c @@ -664,7 +664,11 @@ again: FALSE, PIN_WAIT, &bh->b_bcb, +#ifdef __REACTOS__ (PVOID *)&bh->b_data)) { +#else + &bh->b_data)) { +#endif Ext2Sleep(100); goto again; } @@ -674,7 +678,11 @@ again: bh->b_size, PIN_WAIT, &bh->b_bcb, +#ifdef __REACTOS__ (PVOID *)&bh->b_data)) { +#else + &bh->b_data)) { +#endif Ext2Sleep(100); goto again; } diff --git a/drivers/filesystems/ext2/src/memory.c b/drivers/filesystems/ext2/src/memory.c index 26d342e1b0a..4cce98a222b 100644 --- a/drivers/filesystems/ext2/src/memory.c +++ b/drivers/filesystems/ext2/src/memory.c @@ -1819,7 +1819,11 @@ Ext2CleanupAllMcbs(PEXT2_VCB Vcb) TRUE ); LockAcquired = TRUE; +#ifdef __REACTOS__ while ((Mcb = Ext2FirstUnusedMcb(Vcb, TRUE, Vcb->NumOfMcb)) != 0) { +#else + while (Mcb = Ext2FirstUnusedMcb(Vcb, TRUE, Vcb->NumOfMcb)) { +#endif while (Mcb) { PEXT2_MCB Next = Mcb->Next; if (IsMcbSymLink(Mcb)) { @@ -2209,7 +2213,11 @@ Ext2PerformRegistryVolumeParams(IN PEXT2_VCB Vcb) memcpy(Vcb->Codepage.AnsiName, Ext2Global->Codepage.AnsiName, CODEPAGE_MAXLEN); Vcb->Codepage.PageTable = Ext2Global->Codepage.PageTable; +#ifdef __REACTOS__ if (Vcb->bHidingPrefix == Ext2Global->bHidingPrefix) { +#else + if (Vcb->bHidingPrefix = Ext2Global->bHidingPrefix) { +#endif RtlCopyMemory( Vcb->sHidingPrefix, Ext2Global->sHidingPrefix, HIDINGPAT_LEN); @@ -2218,7 +2226,11 @@ Ext2PerformRegistryVolumeParams(IN PEXT2_VCB Vcb) HIDINGPAT_LEN); } +#ifdef __REACTOS__ if (Vcb->bHidingSuffix == Ext2Global->bHidingSuffix) { +#else + if (Vcb->bHidingSuffix = Ext2Global->bHidingSuffix) { +#endif RtlCopyMemory( Vcb->sHidingSuffix, Ext2Global->sHidingSuffix, HIDINGPAT_LEN); @@ -3035,7 +3047,11 @@ Ext2FirstUnusedMcb(PEXT2_VCB Vcb, BOOLEAN Wait, ULONG Number) /* Reaper thread to release unused Mcb blocks */ +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2McbReaperThread( PVOID Context ) @@ -3215,7 +3231,11 @@ Ext2QueryUnusedBH(PEXT2_VCB Vcb, PLIST_ENTRY head) /* Reaper thread to release unused buffer heads */ +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2bhReaperThread( PVOID Context ) @@ -3363,7 +3383,11 @@ again: } /* Reaper thread to release Fcb */ +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2FcbReaperThread( PVOID Context ) @@ -3514,7 +3538,11 @@ Ext2StartReaper(PEXT2_REAPER Reaper, EXT2_REAPER_RELEASE Free) } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2StopReaper(PEXT2_REAPER Reaper) { LARGE_INTEGER timeout; diff --git a/drivers/filesystems/ext2/src/pnp.c b/drivers/filesystems/ext2/src/pnp.c index 1afb9f9b1e9..1297e7eeca7 100644 --- a/drivers/filesystems/ext2/src/pnp.c +++ b/drivers/filesystems/ext2/src/pnp.c @@ -19,7 +19,11 @@ extern PEXT2_GLOBAL Ext2Global; /* DEFINITIONS *************************************************************/ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2PnpCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -38,7 +42,11 @@ Ext2PnpCompletionRoutine ( /* FUNCTIONS *************************************************************/ +#ifdef __REACTOS__ NTSTATUS NTAPI +#else +NTSTATUS +#endif Ext2PnpCompletionRoutine ( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, diff --git a/drivers/filesystems/ext2/src/write.c b/drivers/filesystems/ext2/src/write.c index 08b74c4fcdf..6c39459cfcb 100644 --- a/drivers/filesystems/ext2/src/write.c +++ b/drivers/filesystems/ext2/src/write.c @@ -33,10 +33,18 @@ typedef struct _EXT2_FLPFLUSH_CONTEXT { } EXT2_FLPFLUSH_CONTEXT, *PEXT2_FLPFLUSH_CONTEXT; +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2FloppyFlush(IN PVOID Parameter); +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2FloppyFlushDpc ( IN PKDPC Dpc, IN PVOID DeferredContext, @@ -59,7 +67,11 @@ Ext2DeferWrite(IN PEXT2_IRP_CONTEXT, PIRP Irp); /* FUNCTIONS *************************************************************/ +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2FloppyFlush(IN PVOID Parameter) { PEXT2_FLPFLUSH_CONTEXT Context; @@ -102,7 +114,11 @@ Ext2FloppyFlush(IN PVOID Parameter) Ext2FreePool(Parameter, EXT2_FLPFLUSH_MAGIC); } +#ifdef __REACTOS__ VOID NTAPI +#else +VOID +#endif Ext2FloppyFlushDpc ( IN PKDPC Dpc, IN PVOID DeferredContext,
1 year, 7 months
1
0
0
0
[reactos] 01/01: [SHELL32] Enable Network Connection Rename (#5073)
by Jose Carlos Jesus
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=39d5f1bf54a0f22fff618…
commit 39d5f1bf54a0f22fff618e269c0dd2711aacc7f8 Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com> AuthorDate: Sun Apr 30 14:40:10 2023 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 30 15:40:10 2023 +0200 [SHELL32] Enable Network Connection Rename (#5073) CORE-18750 - Add Network Connection pidl type 0x99; - Add binary comparison to pidl memory range. --- dll/win32/shell32/debughlp.cpp | 1 + dll/win32/shell32/wine/pidl.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dll/win32/shell32/debughlp.cpp b/dll/win32/shell32/debughlp.cpp index 6778418c7a8..388349c70a6 100644 --- a/dll/win32/shell32/debughlp.cpp +++ b/dll/win32/shell32/debughlp.cpp @@ -379,6 +379,7 @@ BOOL pcheck( LPCITEMIDLIST pidl ) case PT_YAGUID: case PT_IESPECIAL2: case PT_SHARE: + case 0x99: /* Network Connection pidl type */ break; default: ERR("unknown IDLIST %p [%p] size=%u type=%x\n", diff --git a/dll/win32/shell32/wine/pidl.c b/dll/win32/shell32/wine/pidl.c index 2ee8c4650fc..9ade43d1956 100644 --- a/dll/win32/shell32/wine/pidl.c +++ b/dll/win32/shell32/wine/pidl.c @@ -522,7 +522,11 @@ BOOL _ILHACKCompareSimpleIds(LPCITEMIDLIST pidltemp1, LPCITEMIDLIST pidltemp2) } else { - return FALSE; + if ((pidltemp1->mkid.cb != pidltemp2->mkid.cb) || + !RtlEqualMemory((BYTE*)&pidltemp1->mkid, (BYTE*)&pidltemp2->mkid, pidltemp1->mkid.cb)) + { + return FALSE; + } } return TRUE;
1 year, 7 months
1
0
0
0
[reactos] 01/01: [SETUPAPI] Sync setupapi/queue.c to Wine 4.8 (#5233)
by Doug Lyons
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c8ec78b71de9a2ea4fac…
commit 5c8ec78b71de9a2ea4faca4c7beec1e54a172a40 Author: Doug Lyons <douglyons(a)douglyons.com> AuthorDate: Sun Apr 30 08:34:26 2023 -0500 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 30 15:34:26 2023 +0200 [SETUPAPI] Sync setupapi/queue.c to Wine 4.8 (#5233) Sync setupapi/queue.c to Wine 4.8 to improve cab extraction. This fixes 'fixme:(dll/win32/setupapi/queue.c:418) awful hack: extracting cabinet' --- dll/win32/setupapi/queue.c | 156 ++++++++++++++++----------------------------- media/doc/WINESYNC.txt | 2 +- 2 files changed, 55 insertions(+), 103 deletions(-) diff --git a/dll/win32/setupapi/queue.c b/dll/win32/setupapi/queue.c index 54517205729..f33fbb8f6fe 100644 --- a/dll/win32/setupapi/queue.c +++ b/dll/win32/setupapi/queue.c @@ -361,12 +361,52 @@ static WCHAR *get_destination_dir( HINF hinf, const WCHAR *section ) return PARSER_get_dest_dir( &context ); } +struct extract_cab_ctx +{ + const WCHAR *src; + const WCHAR *dst; +}; -#ifndef __REACTOS__ -static void (WINAPI *pExtractFiles)( LPSTR, LPSTR, DWORD, DWORD, DWORD, DWORD ); -#else -static void (WINAPI *pExtractFiles)( LPSTR, LPSTR, DWORD, LPSTR, LPVOID, DWORD ); -#endif +static UINT WINAPI extract_cab_cb( void *arg, UINT message, UINT_PTR param1, UINT_PTR param2 ) +{ + struct extract_cab_ctx *ctx = arg; + + switch (message) + { + case SPFILENOTIFY_FILEINCABINET: + { + FILE_IN_CABINET_INFO_W *info = (FILE_IN_CABINET_INFO_W *)param1; + const WCHAR *filename; + + if ((filename = strrchrW( info->NameInCabinet, '\\' ))) + filename++; + else + filename = info->NameInCabinet; + + if (lstrcmpiW( filename, ctx->src )) + return FILEOP_SKIP; + + strcpyW( info->FullTargetName, ctx->dst ); + return FILEOP_DOIT; + } + case SPFILENOTIFY_FILEEXTRACTED: + { + const FILEPATHS_W *paths = (const FILEPATHS_W *)param1; + return paths->Win32Error; + } + case SPFILENOTIFY_NEEDNEWCABINET: + { + const CABINET_INFO_W *info = (const CABINET_INFO_W *)param1; + strcpyW( (WCHAR *)param2, info->CabinetPath ); + return ERROR_SUCCESS; + } + case SPFILENOTIFY_CABINETINFO: + return 0; + default: + FIXME("Unexpected message %#x.\n", message); + return 0; + } +} /*********************************************************************** * extract_cabinet_file @@ -379,111 +419,23 @@ static BOOL extract_cabinet_file( const WCHAR *cabinet, const WCHAR *root, #ifndef __REACTOS__ static const WCHAR extW[] = {'.','c','a','b',0}; #endif - static HMODULE advpack; - - char *cab_path, *cab_file; - int len = strlenW( cabinet ); + static const WCHAR backslashW[] = {'\\',0}; + WCHAR path[MAX_PATH]; + struct extract_cab_ctx ctx = {src, dst}; #ifdef __REACTOS__ TRACE("extract_cabinet_file(cab = '%s' ; root = '%s' ; src = '%s' ; dst = '%s')\n", debugstr_w(cabinet), debugstr_w(root), debugstr_w(src), debugstr_w(dst)); #else + int len = strlenW( cabinet ); /* make sure the cabinet file has a .cab extension */ if (len <= 4 || strcmpiW( cabinet + len - 4, extW )) return FALSE; #endif - if (!pExtractFiles) - { - if (!advpack && !(advpack = LoadLibraryA( "advpack.dll" ))) - { - ERR( "could not load advpack.dll\n" ); - return FALSE; - } - if (!(pExtractFiles = (void *)GetProcAddress( advpack, "ExtractFiles" ))) - { - ERR( "could not find ExtractFiles in advpack.dll\n" ); - return FALSE; - } - } - - if (!(cab_path = strdupWtoA( root ))) return FALSE; - len = WideCharToMultiByte( CP_ACP, 0, cabinet, -1, NULL, 0, NULL, NULL ); - if (!(cab_file = HeapAlloc( GetProcessHeap(), 0, strlen(cab_path) + len + 1 ))) - { - HeapFree( GetProcessHeap(), 0, cab_path ); - return FALSE; - } - strcpy( cab_file, cab_path ); - if (cab_file[0] && cab_file[strlen(cab_file)-1] != '\\') strcat( cab_file, "\\" ); - WideCharToMultiByte( CP_ACP, 0, cabinet, -1, cab_file + strlen(cab_file), len, NULL, NULL ); - FIXME( "awful hack: extracting cabinet %s\n", debugstr_a(cab_file) ); - -#ifdef __REACTOS__ - { - BOOL Success; - char *src_file; - const WCHAR *src_fileW; - WCHAR TempPath[MAX_PATH]; - - /* Retrieve the temporary path */ - if (!GetTempPathW(ARRAYSIZE(TempPath), TempPath)) - { - ERR("GetTempPathW error\n"); - HeapFree( GetProcessHeap(), 0, cab_file ); - return FALSE; - } + strcpyW(path, root); + strcatW(path, backslashW); + strcatW(path, cabinet); - /* Build the real path to where the file will be extracted */ - HeapFree( GetProcessHeap(), 0, cab_path ); - if (!(cab_path = strdupWtoA( TempPath ))) - { - HeapFree( GetProcessHeap(), 0, cab_file ); - return FALSE; - } - - /* Build the file list */ - src_fileW = strrchrW(src, '\\'); // Find where the filename starts. - if (src_fileW) ++src_fileW; - else src_fileW = src; - /* Convert to ANSI */ - if (!(src_file = strdupWtoA( src_fileW ))) - { - HeapFree( GetProcessHeap(), 0, cab_file ); - HeapFree( GetProcessHeap(), 0, cab_path ); - return FALSE; - } - - /* Prepare for the move operation */ - /* Build the full path to the extracted file, that will be renamed */ - if (!(src = HeapAlloc( GetProcessHeap(), 0, (strlenW(TempPath) + 1 + strlenW(src_fileW) + 1) * sizeof(WCHAR) ))) - { - HeapFree( GetProcessHeap(), 0, src_file ); - HeapFree( GetProcessHeap(), 0, cab_file ); - HeapFree( GetProcessHeap(), 0, cab_path ); - return FALSE; - } - concat_W( (WCHAR*)src, NULL, TempPath, src_fileW ); - - TRACE("pExtractFiles(cab_file = '%s' ; cab_path = '%s', src_file = '%s')\n", - debugstr_a(cab_file), debugstr_a(cab_path), debugstr_a(src_file)); - - /* Extract to temporary folder */ - pExtractFiles( cab_file, cab_path, 0, src_file, NULL, 0 ); - HeapFree( GetProcessHeap(), 0, src_file ); - HeapFree( GetProcessHeap(), 0, cab_file ); - HeapFree( GetProcessHeap(), 0, cab_path ); - - /* Move to destination, overwriting the original file if needed */ - TRACE("Renaming src = '%s' to dst = '%s')\n", debugstr_w(src), debugstr_w(dst)); - Success = MoveFileExW( src, dst , MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED ); - HeapFree( GetProcessHeap(), 0, (WCHAR*)src ); - return Success; - } -#else - pExtractFiles( cab_file, cab_path, 0, 0, 0, 0 ); - HeapFree( GetProcessHeap(), 0, cab_file ); - HeapFree( GetProcessHeap(), 0, cab_path ); - return CopyFileW( src, dst, FALSE /*FIXME*/ ); -#endif + return SetupIterateCabinetW( path, 0, extract_cab_cb, &ctx ); } @@ -1493,7 +1445,7 @@ BOOL WINAPI SetupCommitFileQueueW( HWND owner, HSPFILEQ handle, PSP_FILE_CALLBAC if (op->src_tag) { if (extract_cabinet_file( op->src_tag, op->src_root, - paths.Source, paths.Target )) break; + op->src_file, paths.Target )) break; } paths.Win32Error = GetLastError(); op_result = handler( context, SPFILENOTIFY_COPYERROR, diff --git a/media/doc/WINESYNC.txt b/media/doc/WINESYNC.txt index cb460336c0d..5ae9963f7de 100644 --- a/media/doc/WINESYNC.txt +++ b/media/doc/WINESYNC.txt @@ -363,7 +363,7 @@ secur32 - setupapi - dll/win32/setupapi/dialog.c # Synced to WineStaging-1.9.15 - dll/win32/setupapi/query.c # Partially synced to WineStaging-1.9.4 + dll/win32/setupapi/query.c # Partially synced to Wine-4.8 dll/win32/setupapi/setupcab.c # Synced to WineStaging-1.9.4 win32k -
1 year, 7 months
1
0
0
0
[reactos] 01/01: [COMDLG32] Enable saving files with different extension (#4903)
by Jose Carlos Jesus
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a0d747fa5051e2795df65…
commit a0d747fa5051e2795df6549b786ba8f2c9f6e1a6 Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com> AuthorDate: Sun Apr 30 14:21:20 2023 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 30 15:21:20 2023 +0200 [COMDLG32] Enable saving files with different extension (#4903) As on Windows, gives precedence to the user's extension in file names if there is one. Otherwise appends the selected extension. If not selected, append default extension. --- dll/win32/comdlg32/filedlg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/win32/comdlg32/filedlg.c b/dll/win32/comdlg32/filedlg.c index cf1d2bc34c2..54bbc544aab 100644 --- a/dll/win32/comdlg32/filedlg.c +++ b/dll/win32/comdlg32/filedlg.c @@ -3099,6 +3099,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) /* Attach the file extension with file name*/ ext = PathFindExtensionW(lpstrPathAndFile); #ifdef __REACTOS__ + if (*ext == UNICODE_NULL && fodInfos->defext) { LPWSTR filterExt = NULL, lpstrFilter = NULL, pch, pchNext; LPCWSTR the_ext = NULL;
1 year, 7 months
1
0
0
0
[reactos] 01/01: [FREELDR] Add disk access handlers for UEFI (#5219)
by Justin Miller
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1fd9d11f160c10e70311b…
commit 1fd9d11f160c10e70311b4176d0fad950b6cfe54 Author: Justin Miller <justinmiller100(a)gmail.com> AuthorDate: Sun Apr 30 05:57:10 2023 -0700 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Apr 30 14:57:10 2023 +0200 [FREELDR] Add disk access handlers for UEFI (#5219) CORE-11953 --- boot/freeldr/freeldr/arch/uefi/stubs.c | 34 -- boot/freeldr/freeldr/arch/uefi/uefidisk.c | 596 ++++++++++++++++++++++++++++++ boot/freeldr/freeldr/uefi.cmake | 7 +- 3 files changed, 600 insertions(+), 37 deletions(-) diff --git a/boot/freeldr/freeldr/arch/uefi/stubs.c b/boot/freeldr/freeldr/arch/uefi/stubs.c index 75f7ee0fc8b..28f11b7795b 100644 --- a/boot/freeldr/freeldr/arch/uefi/stubs.c +++ b/boot/freeldr/freeldr/arch/uefi/stubs.c @@ -48,40 +48,6 @@ UefiGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, } -UCHAR -UefiGetFloppyCount(VOID) -{ - return 0; -} - -BOOLEAN -UefiDiskReadLogicalSectors(IN UCHAR DriveNumber, - IN ULONGLONG SectorNumber, - IN ULONG SectorCount, - OUT PVOID Buffer) -{ - return 0; -} - -BOOLEAN -UefiDiskGetDriveGeometry(UCHAR DriveNumber, - PGEOMETRY Geometry) -{ - return 0; -} - -ULONG -UefiDiskGetCacheableBlockCount(UCHAR DriveNumber) -{ - return 0; -} - -BOOLEAN -UefiInitializeBootDevices(VOID) -{ - return 0; -} - PCONFIGURATION_COMPONENT_DATA UefiHwDetect(VOID) { diff --git a/boot/freeldr/freeldr/arch/uefi/uefidisk.c b/boot/freeldr/freeldr/arch/uefi/uefidisk.c new file mode 100644 index 00000000000..772cdece7ce --- /dev/null +++ b/boot/freeldr/freeldr/arch/uefi/uefidisk.c @@ -0,0 +1,596 @@ +/* + * PROJECT: FreeLoader UEFI Support + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Disk Access Functions + * COPYRIGHT: Copyright 2022 Justin Miller <justinmiller100(a)gmail.com> + */ + +/* INCLUDES ******************************************************************/ + +#include <uefildr.h> + +#include <debug.h> +DBG_DEFAULT_CHANNEL(WARNING); + +#define TAG_HW_RESOURCE_LIST 'lRwH' +#define TAG_HW_DISK_CONTEXT 'cDwH' +#define FIRST_BIOS_DISK 0x80 +#define FIRST_PARTITION 1 + +typedef struct tagDISKCONTEXT +{ + UCHAR DriveNumber; + ULONG SectorSize; + ULONGLONG SectorOffset; + ULONGLONG SectorCount; + ULONGLONG SectorNumber; +} DISKCONTEXT; + +typedef struct _INTERNAL_UEFI_DISK +{ + UCHAR ArcDriveNumber; + UCHAR NumOfPartitions; + UCHAR UefiRootNumber; + BOOLEAN IsThisTheBootDrive; +} INTERNAL_UEFI_DISK, *PINTERNAL_UEFI_DISK; + +/* GLOBALS *******************************************************************/ + +extern EFI_SYSTEM_TABLE* GlobalSystemTable; +extern EFI_HANDLE GlobalImageHandle; +extern EFI_HANDLE PublicBootHandle; /* Freeldr itself */ + +/* Made to match BIOS */ +PVOID DiskReadBuffer; +UCHAR PcBiosDiskCount; + +UCHAR FrldrBootDrive; +ULONG FrldrBootPartition; +SIZE_T DiskReadBufferSize; +PVOID Buffer; + +static const CHAR Hex[] = "0123456789abcdef"; +static CHAR PcDiskIdentifier[32][20]; + +/* UEFI-specific */ +static ULONG UefiBootRootIdentifier; +static ULONG OffsetToBoot; +static ULONG PublicBootArcDisk; +static INTERNAL_UEFI_DISK* InternalUefiDisk = NULL; +static EFI_GUID bioGuid = BLOCK_IO_PROTOCOL; +static EFI_BLOCK_IO* bio; +static EFI_HANDLE* handles = NULL; + +/* FUNCTIONS *****************************************************************/ + +PCHAR +GetHarddiskIdentifier(UCHAR DriveNumber) +{ + TRACE("GetHarddiskIdentifier: DriveNumber: %d\n", DriveNumber); + return PcDiskIdentifier[DriveNumber - FIRST_BIOS_DISK]; +} + +static LONG lReportError = 0; // >= 0: display errors; < 0: hide errors. + +LONG +DiskReportError(BOOLEAN bShowError) +{ + /* Set the reference count */ + if (bShowError) ++lReportError; + else --lReportError; + return lReportError; +} + +static +BOOLEAN +UefiGetBootPartitionEntry( + IN UCHAR DriveNumber, + OUT PPARTITION_TABLE_ENTRY PartitionTableEntry, + OUT PULONG BootPartition) +{ + ULONG PartitionNum; + + TRACE("UefiGetBootPartitionEntry: DriveNumber: %d\n", DriveNumber - FIRST_BIOS_DISK); + /* UefiBootRoot is the offset into the array of handles where the raw disk of the boot drive is. + * Partitions start with 1 in ARC, but UEFI root drive identitfier is also first partition. */ + PartitionNum = (OffsetToBoot - UefiBootRootIdentifier); + if (PartitionNum == 0) + { + TRACE("Boot PartitionNumber is 0\n"); + /* The OffsetToBoot is equal to the RootIdentifier */ + PartitionNum = 1; + } + + *BootPartition = PartitionNum; + TRACE("UefiGetBootPartitionEntry: Boot Partition is: %d\n", PartitionNum); + return TRUE; +} + +static +ARC_STATUS +UefiDiskClose(ULONG FileId) +{ + DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); + FrLdrTempFree(Context, TAG_HW_DISK_CONTEXT); + return ESUCCESS; +} + +static +ARC_STATUS +UefiDiskGetFileInformation(ULONG FileId, FILEINFORMATION *Information) +{ + DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); + RtlZeroMemory(Information, sizeof(*Information)); + + /* + * The ARC specification mentions that for partitions, StartingAddress and + * EndingAddress are the start and end positions of the partition in terms + * of byte offsets from the start of the disk. + * CurrentAddress is the current offset into (i.e. relative to) the partition. + */ + Information->StartingAddress.QuadPart = Context->SectorOffset * Context->SectorSize; + Information->EndingAddress.QuadPart = (Context->SectorOffset + Context->SectorCount) * Context->SectorSize; + Information->CurrentAddress.QuadPart = Context->SectorNumber * Context->SectorSize; + + return ESUCCESS; +} + +static +ARC_STATUS +UefiDiskOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId) +{ + DISKCONTEXT* Context; + UCHAR DriveNumber; + ULONG DrivePartition, SectorSize; + ULONGLONG SectorOffset = 0; + ULONGLONG SectorCount = 0; + ULONG UefiDriveNumber = 0; + PARTITION_TABLE_ENTRY PartitionTableEntry; + + TRACE("UefiDiskOpen: File ID: %d, Path: %s\n", FileId, Path); + + if (DiskReadBufferSize == 0) + { + ERR("DiskOpen(): DiskReadBufferSize is 0, something is wrong.\n"); + ASSERT(FALSE); + return ENOMEM; + } + + if (!DissectArcPath(Path, NULL, &DriveNumber, &DrivePartition)) + return EINVAL; + + TRACE("Opening disk: DriveNumber: %d, DrivePartition: %d\n", DriveNumber, DrivePartition); + UefiDriveNumber = DriveNumber - FIRST_BIOS_DISK; + GlobalSystemTable->BootServices->HandleProtocol(handles[UefiDriveNumber], &bioGuid, (void**)&bio); + SectorSize = bio->Media->BlockSize; + + if (DrivePartition != 0xff && DrivePartition != 0) + { + if (!DiskGetPartitionEntry(DriveNumber, DrivePartition, &PartitionTableEntry)) + return EINVAL; + + SectorOffset = PartitionTableEntry.SectorCountBeforePartition; + SectorCount = PartitionTableEntry.PartitionSectorCount; + } + else + { + GEOMETRY Geometry; + if (!MachDiskGetDriveGeometry(DriveNumber, &Geometry)) + return EINVAL; + + if (SectorSize != Geometry.BytesPerSector) + { + ERR("SectorSize (%lu) != Geometry.BytesPerSector (%lu), expect problems!\n", + SectorSize, Geometry.BytesPerSector); + } + + SectorOffset = 0; + SectorCount = (ULONGLONG)Geometry.Cylinders * Geometry.Heads * Geometry.Sectors; + } + + Context = FrLdrTempAlloc(sizeof(DISKCONTEXT), TAG_HW_DISK_CONTEXT); + if (!Context) + return ENOMEM; + + Context->DriveNumber = DriveNumber; + Context->SectorSize = SectorSize; + Context->SectorOffset = SectorOffset; + Context->SectorCount = SectorCount; + Context->SectorNumber = 0; + FsSetDeviceSpecific(*FileId, Context); + return ESUCCESS; +} + +static +ARC_STATUS +UefiDiskRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count) +{ + DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); + UCHAR* Ptr = (UCHAR*)Buffer; + ULONG Length, TotalSectors, MaxSectors, ReadSectors; + ULONGLONG SectorOffset; + BOOLEAN ret; + + ASSERT(DiskReadBufferSize > 0); + + TotalSectors = (N + Context->SectorSize - 1) / Context->SectorSize; + MaxSectors = DiskReadBufferSize / Context->SectorSize; + SectorOffset = Context->SectorOffset + Context->SectorNumber; + + // If MaxSectors is 0, this will lead to infinite loop. + // In release builds assertions are disabled, however we also have sanity checks in DiskOpen() + ASSERT(MaxSectors > 0); + + ret = TRUE; + + while (TotalSectors) + { + ReadSectors = min(TotalSectors, MaxSectors); + + ret = MachDiskReadLogicalSectors(Context->DriveNumber, + SectorOffset, + ReadSectors, + DiskReadBuffer); + if (!ret) + break; + + Length = ReadSectors * Context->SectorSize; + Length = min(Length, N); + + RtlCopyMemory(Ptr, DiskReadBuffer, Length); + + Ptr += Length; + N -= Length; + SectorOffset += ReadSectors; + TotalSectors -= ReadSectors; + } + + *Count = (ULONG)((ULONG_PTR)Ptr - (ULONG_PTR)Buffer); + Context->SectorNumber = SectorOffset - Context->SectorOffset; + + return (ret ? ESUCCESS : EIO); +} + +static +ARC_STATUS +UefiDiskSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode) +{ + DISKCONTEXT* Context = FsGetDeviceSpecific(FileId); + LARGE_INTEGER NewPosition = *Position; + + switch (SeekMode) + { + case SeekAbsolute: + break; + case SeekRelative: + NewPosition.QuadPart += (Context->SectorNumber * Context->SectorSize); + break; + default: + ASSERT(FALSE); + return EINVAL; + } + + if (NewPosition.QuadPart & (Context->SectorSize - 1)) + return EINVAL; + + /* Convert in number of sectors */ + NewPosition.QuadPart /= Context->SectorSize; + + /* HACK: CDROMs may have a SectorCount of 0 */ + if (Context->SectorCount != 0 && NewPosition.QuadPart >= Context->SectorCount) + return EINVAL; + + Context->SectorNumber = NewPosition.QuadPart; + return ESUCCESS; +} + +static const DEVVTBL UefiDiskVtbl = +{ + UefiDiskClose, + UefiDiskGetFileInformation, + UefiDiskOpen, + UefiDiskRead, + UefiDiskSeek, +}; + +static +VOID +GetHarddiskInformation(UCHAR DriveNumber) +{ + PMASTER_BOOT_RECORD Mbr; + PULONG Buffer; + ULONG i; + ULONG Checksum; + ULONG Signature; + BOOLEAN ValidPartitionTable; + CHAR ArcName[MAX_PATH]; + PARTITION_TABLE_ENTRY PartitionTableEntry; + PCHAR Identifier = PcDiskIdentifier[DriveNumber - FIRST_BIOS_DISK]; + + /* Detect disk partition type */ + DiskDetectPartitionType(DriveNumber); + + /* Read the MBR */ + if (!MachDiskReadLogicalSectors(DriveNumber, 0ULL, 1, DiskReadBuffer)) + { + ERR("Reading MBR failed\n"); + /* We failed, use a default identifier */ + sprintf(Identifier, "BIOSDISK%d", DriveNumber - FIRST_BIOS_DISK); + return; + } + + Buffer = (ULONG*)DiskReadBuffer; + Mbr = (PMASTER_BOOT_RECORD)DiskReadBuffer; + + Signature = Mbr->Signature; + TRACE("Signature: %x\n", Signature); + + /* Calculate the MBR checksum */ + Checksum = 0; + for (i = 0; i < 512 / sizeof(ULONG); i++) + { + Checksum += Buffer[i]; + } + Checksum = ~Checksum + 1; + TRACE("Checksum: %x\n", Checksum); + + ValidPartitionTable = (Mbr->MasterBootRecordMagic == 0xAA55); + + /* Fill out the ARC disk block */ + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)", DriveNumber - FIRST_BIOS_DISK); + AddReactOSArcDiskInfo(ArcName, Signature, Checksum, ValidPartitionTable); + + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - FIRST_BIOS_DISK); + FsRegisterDevice(ArcName, &UefiDiskVtbl); + + /* Add partitions */ + i = FIRST_PARTITION; + DiskReportError(FALSE); + while (DiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) + { + if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) + { + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber - FIRST_BIOS_DISK, i); + FsRegisterDevice(ArcName, &UefiDiskVtbl); + } + i++; + } + DiskReportError(TRUE); + + InternalUefiDisk[DriveNumber].NumOfPartitions = i; + /* Convert checksum and signature to identifier string */ + Identifier[0] = Hex[(Checksum >> 28) & 0x0F]; + Identifier[1] = Hex[(Checksum >> 24) & 0x0F]; + Identifier[2] = Hex[(Checksum >> 20) & 0x0F]; + Identifier[3] = Hex[(Checksum >> 16) & 0x0F]; + Identifier[4] = Hex[(Checksum >> 12) & 0x0F]; + Identifier[5] = Hex[(Checksum >> 8) & 0x0F]; + Identifier[6] = Hex[(Checksum >> 4) & 0x0F]; + Identifier[7] = Hex[Checksum & 0x0F]; + Identifier[8] = '-'; + Identifier[9] = Hex[(Signature >> 28) & 0x0F]; + Identifier[10] = Hex[(Signature >> 24) & 0x0F]; + Identifier[11] = Hex[(Signature >> 20) & 0x0F]; + Identifier[12] = Hex[(Signature >> 16) & 0x0F]; + Identifier[13] = Hex[(Signature >> 12) & 0x0F]; + Identifier[14] = Hex[(Signature >> 8) & 0x0F]; + Identifier[15] = Hex[(Signature >> 4) & 0x0F]; + Identifier[16] = Hex[Signature & 0x0F]; + Identifier[17] = '-'; + Identifier[18] = (ValidPartitionTable ? 'A' : 'X'); + Identifier[19] = 0; + TRACE("Identifier: %s\n", Identifier); +} + +static +VOID +UefiSetupBlockDevices(VOID) +{ + ULONG BlockDeviceIndex; + ULONG SystemHandleCount; + EFI_STATUS Status; + ULONG i; + + UINTN handle_size = 0; + PcBiosDiskCount = 0; + UefiBootRootIdentifier = 0; + + /* 1) Setup a list of boothandles by using the LocateHandle protocol */ + Status = GlobalSystemTable->BootServices->LocateHandle(ByProtocol, &bioGuid, NULL, &handle_size, handles); + handles = MmAllocateMemoryWithType(handle_size, LoaderFirmwareTemporary); + Status = GlobalSystemTable->BootServices->LocateHandle(ByProtocol, &bioGuid, NULL, &handle_size, handles); + SystemHandleCount = handle_size / sizeof(EFI_HANDLE); + InternalUefiDisk = MmAllocateMemoryWithType(sizeof(INTERNAL_UEFI_DISK) * SystemHandleCount, LoaderFirmwareTemporary); + + BlockDeviceIndex = 0; + /* 2) Parse the handle list */ + for (i = 0; i < SystemHandleCount; ++i) + { + Status = GlobalSystemTable->BootServices->HandleProtocol(handles[i], &bioGuid, (void**)&bio); + if (handles[i] == PublicBootHandle) + { + OffsetToBoot = i; /* Drive offset in the handles list */ + } + + if (EFI_ERROR(Status) || + bio == NULL || + bio->Media->BlockSize == 0 || + bio->Media->BlockSize > 2048) + { + TRACE("UefiSetupBlockDevices: UEFI has found a block device that failed, skipping\n"); + continue; + } + if (bio->Media->LogicalPartition == FALSE) + { + TRACE("Found root of a HDD\n"); + PcBiosDiskCount++; + InternalUefiDisk[BlockDeviceIndex].ArcDriveNumber = BlockDeviceIndex; + InternalUefiDisk[BlockDeviceIndex].UefiRootNumber = i; + GetHarddiskInformation(BlockDeviceIndex + FIRST_BIOS_DISK); + BlockDeviceIndex++; + } + else if (handles[i] == PublicBootHandle) + { + ULONG increment = 0; + ULONG i; + + /* 3) Grab the offset into the array of handles and decrement per volume (valid partition) */ + for (increment = OffsetToBoot; increment > 0; increment--) + { + GlobalSystemTable->BootServices->HandleProtocol(handles[increment], &bioGuid, (void**)&bio); + if (bio->Media->LogicalPartition == FALSE) + { + TRACE("Found root at increment %u\n", increment); + UefiBootRootIdentifier = increment; + + for (i = 0; i <= PcBiosDiskCount; ++i) + { + /* Now only of the root drive number is equal to this drive we found above */ + if (InternalUefiDisk[i].UefiRootNumber == UefiBootRootIdentifier) + { + InternalUefiDisk[i].IsThisTheBootDrive == TRUE; + PublicBootArcDisk = i; + TRACE("Found Boot drive\n"); + } + } + + break; + } + } + } + } +} + +static +BOOLEAN +UefiSetBootpath(VOID) +{ + TRACE("UefiSetBootpath: Setting up boot path\n"); + GlobalSystemTable->BootServices->HandleProtocol(handles[UefiBootRootIdentifier], &bioGuid, (void**)&bio); + FrldrBootDrive = (FIRST_BIOS_DISK + PublicBootArcDisk); + if (bio->Media->RemovableMedia == TRUE && bio->Media->BlockSize == 2048) + { + /* Boot Partition 0xFF is the magic value that indicates booting from CD-ROM (see isoboot.S) */ + FrldrBootPartition == 0xFF; + RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), + "multi(0)disk(0)cdrom(%u)", PublicBootArcDisk); + } + else + { + ULONG BootPartition; + PARTITION_TABLE_ENTRY PartitionEntry; + + /* This is a hard disk */ + if (!UefiGetBootPartitionEntry(FrldrBootDrive, &PartitionEntry, &BootPartition)) + { + ERR("Failed to get boot partition entry\n"); + return FALSE; + } + + RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), + "multi(0)disk(0)rdisk(%u)partition(%lu)", + PublicBootArcDisk, BootPartition); + } + + return TRUE; +} + +BOOLEAN +UefiInitializeBootDevices(VOID) +{ + ULONG i = 0; + + DiskReadBufferSize = EFI_PAGE_SIZE; + DiskReadBuffer = MmAllocateMemoryWithType(DiskReadBufferSize, LoaderFirmwareTemporary); + UefiSetupBlockDevices(); + UefiSetBootpath(); + + /* Add it, if it's a cdrom */ + GlobalSystemTable->BootServices->HandleProtocol(handles[UefiBootRootIdentifier], &bioGuid, (void**)&bio); + if (bio->Media->RemovableMedia == TRUE && bio->Media->BlockSize == 2048) + { + PMASTER_BOOT_RECORD Mbr; + PULONG Buffer; + ULONG Checksum = 0; + ULONG Signature; + + /* Read the MBR */ + if (!MachDiskReadLogicalSectors(FrldrBootDrive, 16ULL, 1, DiskReadBuffer)) + { + ERR("Reading MBR failed\n"); + return FALSE; + } + + Buffer = (ULONG*)DiskReadBuffer; + Mbr = (PMASTER_BOOT_RECORD)DiskReadBuffer; + + Signature = Mbr->Signature; + TRACE("Signature: %x\n", Signature); + + /* Calculate the MBR checksum */ + for (i = 0; i < 2048 / sizeof(ULONG); i++) + { + Checksum += Buffer[i]; + } + Checksum = ~Checksum + 1; + TRACE("Checksum: %x\n", Checksum); + + /* Fill out the ARC disk block */ + AddReactOSArcDiskInfo(FrLdrBootPath, Signature, Checksum, TRUE); + + FsRegisterDevice(FrLdrBootPath, &UefiDiskVtbl); + PcBiosDiskCount++; // This is not accounted for in the number of pre-enumerated BIOS drives! + TRACE("Additional boot drive detected: 0x%02X\n", (int)FrldrBootDrive); + } + return TRUE; +} + +UCHAR +UefiGetFloppyCount(VOID) +{ + /* No floppy for you for now... */ + return 0; +} + +BOOLEAN +UefiDiskReadLogicalSectors( + IN UCHAR DriveNumber, + IN ULONGLONG SectorNumber, + IN ULONG SectorCount, + OUT PVOID Buffer) +{ + ULONG UefiDriveNumber; + + UefiDriveNumber = InternalUefiDisk[DriveNumber - FIRST_BIOS_DISK].UefiRootNumber; + TRACE("UefiDiskReadLogicalSectors: DriveNumber: %d\n", UefiDriveNumber); + GlobalSystemTable->BootServices->HandleProtocol(handles[UefiDriveNumber], &bioGuid, (void**)&bio); + + /* Devices setup */ + bio->ReadBlocks(bio, bio->Media->MediaId, SectorNumber, SectorCount * bio->Media->BlockSize, Buffer); + return TRUE; +} + +BOOLEAN +UefiDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry) +{ + ULONG UefiDriveNumber; + + UefiDriveNumber = InternalUefiDisk[DriveNumber - FIRST_BIOS_DISK].UefiRootNumber; + GlobalSystemTable->BootServices->HandleProtocol(handles[UefiDriveNumber], &bioGuid, (void**)&bio); + Geometry->Cylinders = 1; // Not relevant for the UEFI BIO protocol + Geometry->Heads = 1; // Not relevant for the UEFI BIO protocol + Geometry->Sectors = bio->Media->LastBlock; // Number of sectors per track + Geometry->BytesPerSector = bio->Media->BlockSize; // Number of bytes per sector + + return TRUE; +} + +ULONG +UefiDiskGetCacheableBlockCount(UCHAR DriveNumber) +{ + ULONG UefiDriveNumber = InternalUefiDisk[DriveNumber - FIRST_BIOS_DISK].UefiRootNumber; + TRACE("UefiDiskGetCacheableBlockCount: DriveNumber: %d\n", UefiDriveNumber); + + GlobalSystemTable->BootServices->HandleProtocol(handles[UefiDriveNumber], &bioGuid, (void**)&bio); + return bio->Media->LastBlock; +} diff --git a/boot/freeldr/freeldr/uefi.cmake b/boot/freeldr/freeldr/uefi.cmake index 94b5baa7630..0adb0a25f4b 100644 --- a/boot/freeldr/freeldr/uefi.cmake +++ b/boot/freeldr/freeldr/uefi.cmake @@ -14,11 +14,12 @@ include_directories(BEFORE list(APPEND UEFILDR_ARC_SOURCE ${FREELDR_ARC_SOURCE} arch/uefi/stubs.c - arch/uefi/uefisetup.c - arch/uefi/uefivid.c - arch/uefi/uefiutil.c arch/uefi/ueficon.c + arch/uefi/uefidisk.c arch/uefi/uefimem.c + arch/uefi/uefisetup.c + arch/uefi/uefiutil.c + arch/uefi/uefivid.c arch/vgafont.c) if(ARCH STREQUAL "i386")
1 year, 7 months
1
0
0
0
[reactos] 01/01: [E1000] Stop logging MAC, is sensitive data of log-contributors (#5254)
by Joachim Henze
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3c797b314fb639e04c8fa…
commit 3c797b314fb639e04c8fa75f010c81a4924d674d Author: Joachim Henze <joachim.henze(a)reactos.org> AuthorDate: Sat Apr 29 23:02:03 2023 +0200 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Apr 29 23:02:03 2023 +0200 [E1000] Stop logging MAC, is sensitive data of log-contributors (#5254) --- drivers/network/dd/e1000/hardware.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/network/dd/e1000/hardware.c b/drivers/network/dd/e1000/hardware.c index c0c41ce9403..94208847274 100644 --- a/drivers/network/dd/e1000/hardware.c +++ b/drivers/network/dd/e1000/hardware.c @@ -676,6 +676,7 @@ NICGetPermanentMacAddress( Adapter->PermanentMacAddress[n * 2 + 1] = (AddrWord >> 8) & 0xff; } +#if 0 NDIS_DbgPrint(MIN_TRACE, ("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", Adapter->PermanentMacAddress[0], Adapter->PermanentMacAddress[1], @@ -683,6 +684,7 @@ NICGetPermanentMacAddress( Adapter->PermanentMacAddress[3], Adapter->PermanentMacAddress[4], Adapter->PermanentMacAddress[5])); +#endif return NDIS_STATUS_SUCCESS; }
1 year, 7 months
1
0
0
0
[reactos] 01/01: [NOTEPAD] Delete my name from resource copyright text (#5261)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c9ed65e0cc0a8243f4fca…
commit c9ed65e0cc0a8243f4fca98988b9205c7d03fc15 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Apr 28 21:48:45 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Apr 28 21:48:45 2023 +0900 [NOTEPAD] Delete my name from resource copyright text (#5261) The copyright text was too long. CORE-18837 --- base/applications/notepad/lang/bg-BG.rc | 2 +- base/applications/notepad/lang/cs-CZ.rc | 2 +- base/applications/notepad/lang/da-DK.rc | 2 +- base/applications/notepad/lang/de-DE.rc | 2 +- base/applications/notepad/lang/el-GR.rc | 2 +- base/applications/notepad/lang/en-US.rc | 2 +- base/applications/notepad/lang/es-ES.rc | 2 +- base/applications/notepad/lang/et-EE.rc | 2 +- base/applications/notepad/lang/eu-ES.rc | 2 +- base/applications/notepad/lang/fi-FI.rc | 2 +- base/applications/notepad/lang/fr-FR.rc | 2 +- base/applications/notepad/lang/he-IL.rc | 2 +- base/applications/notepad/lang/hi-IN.rc | 2 +- base/applications/notepad/lang/hr-HR.rc | 2 +- base/applications/notepad/lang/hu-HU.rc | 2 +- base/applications/notepad/lang/hy-AM.rc | 2 +- base/applications/notepad/lang/id-ID.rc | 2 +- base/applications/notepad/lang/it-IT.rc | 2 +- base/applications/notepad/lang/ja-JP.rc | 2 +- base/applications/notepad/lang/lt-LT.rc | 2 +- base/applications/notepad/lang/ms-MY.rc | 2 +- base/applications/notepad/lang/nl-NL.rc | 2 +- base/applications/notepad/lang/no-NO.rc | 2 +- base/applications/notepad/lang/pl-PL.rc | 2 +- base/applications/notepad/lang/pt-BR.rc | 2 +- base/applications/notepad/lang/pt-PT.rc | 2 +- base/applications/notepad/lang/ro-RO.rc | 2 +- base/applications/notepad/lang/ru-RU.rc | 2 +- base/applications/notepad/lang/sk-SK.rc | 2 +- base/applications/notepad/lang/sl-SI.rc | 2 +- base/applications/notepad/lang/sq-AL.rc | 2 +- base/applications/notepad/lang/sv-SE.rc | 2 +- base/applications/notepad/lang/th-TH.rc | 2 +- base/applications/notepad/lang/tr-TR.rc | 2 +- base/applications/notepad/lang/uk-UA.rc | 2 +- base/applications/notepad/lang/uz-UZ.rc | 2 +- base/applications/notepad/lang/zh-CN.rc | 2 +- base/applications/notepad/lang/zh-HK.rc | 2 +- base/applications/notepad/lang/zh-TW.rc | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/base/applications/notepad/lang/bg-BG.rc b/base/applications/notepad/lang/bg-BG.rc index 9055c7f4d02..9d45a9f5d1d 100644 --- a/base/applications/notepad/lang/bg-BG.rc +++ b/base/applications/notepad/lang/bg-BG.rc @@ -183,5 +183,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Възпроизводствено право 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Възпроизводствено право 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/cs-CZ.rc b/base/applications/notepad/lang/cs-CZ.rc index 903e27a2950..874854b9cf4 100644 --- a/base/applications/notepad/lang/cs-CZ.rc +++ b/base/applications/notepad/lang/cs-CZ.rc @@ -184,5 +184,5 @@ paměti." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Textový dokument" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/da-DK.rc b/base/applications/notepad/lang/da-DK.rc index 4820795e77c..dc637207806 100644 --- a/base/applications/notepad/lang/da-DK.rc +++ b/base/applications/notepad/lang/da-DK.rc @@ -184,5 +184,5 @@ hukommelse, og prøv så igen." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/de-DE.rc b/base/applications/notepad/lang/de-DE.rc index d3a4abf6087..8220a475df4 100644 --- a/base/applications/notepad/lang/de-DE.rc +++ b/base/applications/notepad/lang/de-DE.rc @@ -185,5 +185,5 @@ um diese Funktion\nabzuschließen. Beenden Sie eine oder mehrere \ STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Textdokument" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/el-GR.rc b/base/applications/notepad/lang/el-GR.rc index 19256689117..4d8cb846c65 100644 --- a/base/applications/notepad/lang/el-GR.rc +++ b/base/applications/notepad/lang/el-GR.rc @@ -184,5 +184,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/en-US.rc b/base/applications/notepad/lang/en-US.rc index c28cf3240bc..a3444ea81b6 100644 --- a/base/applications/notepad/lang/en-US.rc +++ b/base/applications/notepad/lang/en-US.rc @@ -183,5 +183,5 @@ task.\nClose one or more applications to increase the amount of\nfree memory." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/es-ES.rc b/base/applications/notepad/lang/es-ES.rc index f8496402e0a..541fdfbad63 100644 --- a/base/applications/notepad/lang/es-ES.rc +++ b/base/applications/notepad/lang/es-ES.rc @@ -186,5 +186,5 @@ aumentar la cantidad\nde memoria libre." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Documento de texto" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/et-EE.rc b/base/applications/notepad/lang/et-EE.rc index 1bc674396bb..8b1171328fa 100644 --- a/base/applications/notepad/lang/et-EE.rc +++ b/base/applications/notepad/lang/et-EE.rc @@ -191,5 +191,5 @@ käsu lõpetamiseks.\nSulge üks või enam rakendust, et suurendada\nvaba mälu STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Tekstidokument" - STRING_NOTEPAD_AUTHORS "Autoriõigus 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Autoriõigus 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/eu-ES.rc b/base/applications/notepad/lang/eu-ES.rc index 5fcfd64e75a..c9719f4fbc6 100644 --- a/base/applications/notepad/lang/eu-ES.rc +++ b/base/applications/notepad/lang/eu-ES.rc @@ -184,5 +184,5 @@ memoria librearen\nkopurua handitzeko." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/fi-FI.rc b/base/applications/notepad/lang/fi-FI.rc index 97d2ab7e052..6cc2f9a1a0c 100644 --- a/base/applications/notepad/lang/fi-FI.rc +++ b/base/applications/notepad/lang/fi-FI.rc @@ -184,5 +184,5 @@ muistia." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/fr-FR.rc b/base/applications/notepad/lang/fr-FR.rc index 7d6c4b2cfeb..6216cd8804b 100644 --- a/base/applications/notepad/lang/fr-FR.rc +++ b/base/applications/notepad/lang/fr-FR.rc @@ -184,5 +184,5 @@ de la mémoire." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Document Texte" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/he-IL.rc b/base/applications/notepad/lang/he-IL.rc index f598bef0914..afcdd1a9e81 100644 --- a/base/applications/notepad/lang/he-IL.rc +++ b/base/applications/notepad/lang/he-IL.rc @@ -186,5 +186,5 @@ task.\nClose one or more applications to increase the amount of\nfree memory." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/hi-IN.rc b/base/applications/notepad/lang/hi-IN.rc index 63b52387f74..5c568dc677e 100644 --- a/base/applications/notepad/lang/hi-IN.rc +++ b/base/applications/notepad/lang/hi-IN.rc @@ -190,5 +190,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "टेक्स्ट डॉक्यूमॅन्ट" - STRING_NOTEPAD_AUTHORS "कॉपीराइट 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "कॉपीराइट 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/hr-HR.rc b/base/applications/notepad/lang/hr-HR.rc index b7abb8580a7..dea66511d0a 100644 --- a/base/applications/notepad/lang/hr-HR.rc +++ b/base/applications/notepad/lang/hr-HR.rc @@ -190,5 +190,5 @@ zadatak.\nZatvorite jednu ili više aplikacija da povećate\nslobodnu memoriju." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Tekstni dokument" - STRING_NOTEPAD_AUTHORS "Copyright 1997, 98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997, 98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/hu-HU.rc b/base/applications/notepad/lang/hu-HU.rc index 2df30434dbe..18e368941c7 100644 --- a/base/applications/notepad/lang/hu-HU.rc +++ b/base/applications/notepad/lang/hu-HU.rc @@ -184,5 +184,5 @@ Szeretné menteni a változásokat?" STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Szöveges dokumentum" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/hy-AM.rc b/base/applications/notepad/lang/hy-AM.rc index cb2827bb2f5..c1b866313b4 100644 --- a/base/applications/notepad/lang/hy-AM.rc +++ b/base/applications/notepad/lang/hy-AM.rc @@ -183,5 +183,5 @@ Would you like to save the changes ?" STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/id-ID.rc b/base/applications/notepad/lang/id-ID.rc index 35faa63fd76..8405f0f0abf 100644 --- a/base/applications/notepad/lang/id-ID.rc +++ b/base/applications/notepad/lang/id-ID.rc @@ -184,5 +184,5 @@ bebas." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Teks Dokumen" - STRING_NOTEPAD_AUTHORS "Hak Cipta 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Hak Cipta 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/it-IT.rc b/base/applications/notepad/lang/it-IT.rc index d6c6466a539..a22a1586762 100644 --- a/base/applications/notepad/lang/it-IT.rc +++ b/base/applications/notepad/lang/it-IT.rc @@ -184,5 +184,5 @@ di memoria libera." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Documento di testo" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/ja-JP.rc b/base/applications/notepad/lang/ja-JP.rc index cd3450c8741..e9df825c3ac 100644 --- a/base/applications/notepad/lang/ja-JP.rc +++ b/base/applications/notepad/lang/ja-JP.rc @@ -184,5 +184,5 @@ BEGIN STRING_PRINTFAILED "印刷が失敗しました。" STRING_TEXT_DOCUMENT "テキスト文書" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/lt-LT.rc b/base/applications/notepad/lang/lt-LT.rc index 709fa1761dd..3e474ed0041 100644 --- a/base/applications/notepad/lang/lt-LT.rc +++ b/base/applications/notepad/lang/lt-LT.rc @@ -183,5 +183,5 @@ Ar norite išsaugoti pakeitimus?" STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "(C) 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "(C) 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/ms-MY.rc b/base/applications/notepad/lang/ms-MY.rc index 3c7f28427a2..b20afcc378f 100644 --- a/base/applications/notepad/lang/ms-MY.rc +++ b/base/applications/notepad/lang/ms-MY.rc @@ -185,5 +185,5 @@ tugas ini.\nTutup satu atau lebih aplikasi untuk menambah jumlah\ningatan kosong STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/nl-NL.rc b/base/applications/notepad/lang/nl-NL.rc index 1d86e0d78b2..f3ec9a79fb1 100644 --- a/base/applications/notepad/lang/nl-NL.rc +++ b/base/applications/notepad/lang/nl-NL.rc @@ -183,5 +183,5 @@ Wilt u de wijzigingen opslaan?" STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/no-NO.rc b/base/applications/notepad/lang/no-NO.rc index f2d197e3f7b..8df8d4c00b2 100644 --- a/base/applications/notepad/lang/no-NO.rc +++ b/base/applications/notepad/lang/no-NO.rc @@ -184,5 +184,5 @@ minne." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Enerett 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Enerett 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/pl-PL.rc b/base/applications/notepad/lang/pl-PL.rc index c299cfd1d01..97874362419 100644 --- a/base/applications/notepad/lang/pl-PL.rc +++ b/base/applications/notepad/lang/pl-PL.rc @@ -178,5 +178,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Dokument tekstowy" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/pt-BR.rc b/base/applications/notepad/lang/pt-BR.rc index 81f0419d96a..5ff0071c77a 100644 --- a/base/applications/notepad/lang/pt-BR.rc +++ b/base/applications/notepad/lang/pt-BR.rc @@ -183,5 +183,5 @@ tarefa.\nFeche uma ou mais aplicações para aumentar a quantidade de memória l STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/pt-PT.rc b/base/applications/notepad/lang/pt-PT.rc index c3cfd514f13..13f0c79f1f5 100644 --- a/base/applications/notepad/lang/pt-PT.rc +++ b/base/applications/notepad/lang/pt-PT.rc @@ -183,5 +183,5 @@ tarefa.\nFeche uma ou mais aplicações para aumentar a quantidade de memória l STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Documento de texto" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/ro-RO.rc b/base/applications/notepad/lang/ro-RO.rc index 7f86d5a3d18..5b95ee1fac3 100644 --- a/base/applications/notepad/lang/ro-RO.rc +++ b/base/applications/notepad/lang/ro-RO.rc @@ -188,5 +188,5 @@ Păstrați modificările aduse?" STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Document text" - STRING_NOTEPAD_AUTHORS "Drept de autor 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Drept de autor 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/ru-RU.rc b/base/applications/notepad/lang/ru-RU.rc index 5696d407fc0..9867f769f3e 100644 --- a/base/applications/notepad/lang/ru-RU.rc +++ b/base/applications/notepad/lang/ru-RU.rc @@ -183,5 +183,5 @@ BEGIN STRING_PRINTFAILED "Печать не удалась." STRING_TEXT_DOCUMENT "Текстовый документ" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/sk-SK.rc b/base/applications/notepad/lang/sk-SK.rc index c00f4745f72..cead9a46f5e 100644 --- a/base/applications/notepad/lang/sk-SK.rc +++ b/base/applications/notepad/lang/sk-SK.rc @@ -191,5 +191,5 @@ alebo viac aplikácií, aby sa uvoľnila pamäť a skúste to znova." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/sl-SI.rc b/base/applications/notepad/lang/sl-SI.rc index 8c42268355c..0031fd14997 100644 --- a/base/applications/notepad/lang/sl-SI.rc +++ b/base/applications/notepad/lang/sl-SI.rc @@ -183,5 +183,5 @@ operacijo.\nÈe ga želite sprostiti, konèajte enega ali veè programov in posk STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/sq-AL.rc b/base/applications/notepad/lang/sq-AL.rc index efd8b75b5ea..60d5a04da2e 100644 --- a/base/applications/notepad/lang/sq-AL.rc +++ b/base/applications/notepad/lang/sq-AL.rc @@ -187,5 +187,5 @@ detyrë.\nMbyll nje ose me shume programe te rrisesh shumën e\nmemories." STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/sv-SE.rc b/base/applications/notepad/lang/sv-SE.rc index 11731ce4819..70b3e3a2baa 100644 --- a/base/applications/notepad/lang/sv-SE.rc +++ b/base/applications/notepad/lang/sv-SE.rc @@ -183,5 +183,5 @@ den här åtgärden.\nAvsluta ett eller flera program för att frigöra mer minn STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/th-TH.rc b/base/applications/notepad/lang/th-TH.rc index 1d957310321..11fe1192792 100644 --- a/base/applications/notepad/lang/th-TH.rc +++ b/base/applications/notepad/lang/th-TH.rc @@ -178,5 +178,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/tr-TR.rc b/base/applications/notepad/lang/tr-TR.rc index d5485cb3d79..1f37825511e 100644 --- a/base/applications/notepad/lang/tr-TR.rc +++ b/base/applications/notepad/lang/tr-TR.rc @@ -181,5 +181,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Metin Belgesi" - STRING_NOTEPAD_AUTHORS "Telif Hakları: 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Telif Hakları: 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/uk-UA.rc b/base/applications/notepad/lang/uk-UA.rc index 4953a0103be..a914503457a 100644 --- a/base/applications/notepad/lang/uk-UA.rc +++ b/base/applications/notepad/lang/uk-UA.rc @@ -183,5 +183,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Текстовий документ" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/uz-UZ.rc b/base/applications/notepad/lang/uz-UZ.rc index 730a57b33e3..4ea02231662 100644 --- a/base/applications/notepad/lang/uz-UZ.rc +++ b/base/applications/notepad/lang/uz-UZ.rc @@ -183,5 +183,5 @@ O‘zgarishlarni saqlashni istaysizmi?" STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "Text Document" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/zh-CN.rc b/base/applications/notepad/lang/zh-CN.rc index 538b3a7c5fa..12879a31dd8 100644 --- a/base/applications/notepad/lang/zh-CN.rc +++ b/base/applications/notepad/lang/zh-CN.rc @@ -191,5 +191,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "文本文档" - STRING_NOTEPAD_AUTHORS "版权所有 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "版权所有 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/zh-HK.rc b/base/applications/notepad/lang/zh-HK.rc index e20707c627d..7a2c9f23331 100644 --- a/base/applications/notepad/lang/zh-HK.rc +++ b/base/applications/notepad/lang/zh-HK.rc @@ -192,5 +192,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "純文字檔案" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END diff --git a/base/applications/notepad/lang/zh-TW.rc b/base/applications/notepad/lang/zh-TW.rc index cc3be17a2c6..4d64ad1ea94 100644 --- a/base/applications/notepad/lang/zh-TW.rc +++ b/base/applications/notepad/lang/zh-TW.rc @@ -191,5 +191,5 @@ BEGIN STRING_PRINTFAILED "Printing is failed." STRING_TEXT_DOCUMENT "純文字檔案" - STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk, 2020-23 katahiromz\r\n" + STRING_NOTEPAD_AUTHORS "Copyright 1997,98 Marcel Baur, 2000 Mike McCormack, 2002 Sylvain Petreolle, 2002 Andriy Palamarchuk\r\n" END
1 year, 8 months
1
0
0
0
[reactos] 01/01: [RICHED20] RichEdit: CompForm and CandForm (#5257)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31f3eb1d57db73b895984…
commit 31f3eb1d57db73b895984a5c11c33899f07d00f7 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Fri Apr 28 08:28:57 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Apr 28 08:28:57 2023 +0900 [RICHED20] RichEdit: CompForm and CandForm (#5257) Correctly display the composition window and the candidate window. - At update_caret function, set the position and font of the composition window. - We don't use internal composition string. Rely on the composition window. - Improve WM_IME_SETCONTEXT, WM_IME_CONTROL, WM_IME_SELECT, WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION and WM_IME_ENDCOMPOSITION message handlings. CORE-11700 --- dll/win32/riched20/caret.c | 45 ++++++++++++++++++++++++++++++++++ dll/win32/riched20/editor.c | 57 ++++++++++++++++++++++++++++++++++++++++++++ dll/win32/riched20/editstr.h | 2 ++ 3 files changed, 104 insertions(+) diff --git a/dll/win32/riched20/caret.c b/dll/win32/riched20/caret.c index 212c9e9f992..96a95872c2d 100644 --- a/dll/win32/riched20/caret.c +++ b/dll/win32/riched20/caret.c @@ -310,6 +310,51 @@ void update_caret(ME_TextEditor *editor) } else hide_caret(editor); +#ifdef __REACTOS__ + if (ImmIsIME(GetKeyboardLayout(0))) + { + HIMC hIMC = ImmGetContext(editor->hWnd); + if (hIMC) + { + CHARFORMAT2W fmt; + LOGFONTW lf; + COMPOSITIONFORM CompForm; + POINT pt = { x, y }; + + CompForm.ptCurrentPos = pt; + if (editor->styleFlags & ES_MULTILINE) + { + CompForm.dwStyle = CFS_RECT; + CompForm.rcArea = editor->rcFormat; + } + else + { + CompForm.dwStyle = CFS_POINT; + SetRectEmpty(&CompForm.rcArea); + } + ImmSetCompositionWindow(hIMC, &CompForm); + + fmt.cbSize = sizeof(fmt); + ME_GetSelectionCharFormat(editor, &fmt); + + ZeroMemory(&lf, sizeof(lf)); + lf.lfCharSet = DEFAULT_CHARSET; + if (fmt.dwMask & CFM_SIZE) + { + HDC hdc = CreateCompatibleDC(NULL); + lf.lfHeight = -MulDiv(fmt.yHeight, GetDeviceCaps(hdc, LOGPIXELSY), 1440); + DeleteDC(hdc); + } + if (fmt.dwMask & CFM_CHARSET) + lf.lfCharSet = fmt.bCharSet; + if (fmt.dwMask & CFM_FACE) + lstrcpynW(lf.lfFaceName, fmt.szFaceName, ARRAY_SIZE(lf.lfFaceName)); + ImmSetCompositionFontW(hIMC, &lf); + + ImmReleaseContext(editor->hWnd, hIMC); + } + } +#endif } BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, diff --git a/dll/win32/riched20/editor.c b/dll/win32/riched20/editor.c index 5ad25869997..bf13c417542 100644 --- a/dll/win32/riched20/editor.c +++ b/dll/win32/riched20/editor.c @@ -233,6 +233,9 @@ #include "shlwapi.h" #include "rtf.h" #include "imm.h" +#ifdef __REACTOS__ + #include "immdev.h" +#endif #include "res.h" #ifdef __REACTOS__ @@ -4103,6 +4106,14 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_UpdateScrollBar(editor); if (bRepaint) ME_Repaint(editor); +#ifdef __REACTOS__ + if (ImmIsIME(GetKeyboardLayout(0))) + { + HIMC hIMC = ImmGetContext(editor->hWnd); + ImmSetCompositionFontW(hIMC, &lf); + ImmReleaseContext(editor->hWnd, hIMC); + } +#endif return 0; } case WM_SETTEXT: @@ -4779,18 +4790,52 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, ME_RewrapRepaint(editor); goto do_default; } +#ifndef __REACTOS__ /* IME messages to make richedit controls IME aware */ +#endif case WM_IME_SETCONTEXT: +#ifdef __REACTOS__ + { + if (FALSE) /* FIXME: Condition */ + lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW; + + if (wParam) + { + HIMC hIMC = ImmGetContext(editor->hWnd); + LPINPUTCONTEXTDX pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC); + if (pIC) + { + pIC->dwUIFlags &= ~0x40000; + ImmUnlockIMC(hIMC); + } + if (FALSE) /* FIXME: Condition */ + ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0); + ImmReleaseContext(editor->hWnd, hIMC); + } + + return DefWindowProcW(editor->hWnd, msg, wParam, lParam); + } +#endif case WM_IME_CONTROL: +#ifdef __REACTOS__ + return DefWindowProcW(editor->hWnd, msg, wParam, lParam); +#endif case WM_IME_SELECT: +#ifdef __REACTOS__ + return DefWindowProcW(editor->hWnd, msg, wParam, lParam); +#endif case WM_IME_COMPOSITIONFULL: return 0; case WM_IME_STARTCOMPOSITION: { +#ifdef __REACTOS__ + return DefWindowProcW(editor->hWnd, msg, wParam, lParam); +#else editor->imeStartIndex=ME_GetCursorOfs(&editor->pCursors[0]); ME_DeleteSelection(editor); ME_CommitUndo(editor); ME_UpdateRepaint(editor, FALSE); +#endif return 0; } case WM_IME_COMPOSITION: @@ -4813,23 +4858,35 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, lpCompStr = HeapAlloc(GetProcessHeap(),0,dwBufLen + sizeof(WCHAR)); ImmGetCompositionStringW(hIMC, dwIndex, lpCompStr, dwBufLen); lpCompStr[dwBufLen/sizeof(WCHAR)] = 0; +#ifndef __REACTOS__ ME_InsertTextFromCursor(editor,0,lpCompStr,dwBufLen/sizeof(WCHAR),style); +#endif HeapFree(GetProcessHeap(), 0, lpCompStr); +#ifndef __REACTOS__ if (dwIndex == GCS_COMPSTR) set_selection_cursors(editor,editor->imeStartIndex, editor->imeStartIndex + dwBufLen/sizeof(WCHAR)); +#endif } ME_ReleaseStyle(style); ME_CommitUndo(editor); ME_UpdateRepaint(editor, FALSE); +#ifdef __REACTOS__ + return DefWindowProcW(editor->hWnd, msg, wParam, lParam); +#else return 0; +#endif } case WM_IME_ENDCOMPOSITION: { +#ifdef __REACTOS__ + return DefWindowProcW(editor->hWnd, msg, wParam, lParam); +#else ME_DeleteSelection(editor); editor->imeStartIndex=-1; return 0; +#endif } case EM_GETOLEINTERFACE: { diff --git a/dll/win32/riched20/editstr.h b/dll/win32/riched20/editstr.h index 608901a5e22..337750c4052 100644 --- a/dll/win32/riched20/editstr.h +++ b/dll/win32/riched20/editstr.h @@ -426,8 +426,10 @@ typedef struct tagME_TextEditor WCHAR cPasswordMask; BOOL bHaveFocus; BOOL bDialogMode; /* Indicates that we are inside a dialog window */ +#ifndef __REACTOS__ /*for IME */ int imeStartIndex; +#endif DWORD selofs; /* The size of the selection bar on the left side of control */ ME_SelectionType nSelectionType; ME_DisplayItem *first_marked_para;
1 year, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
Results per page:
10
25
50
100
200