Commit graph

2689 commits

Author SHA1 Message Date
Andrew Dent 72ea2d4c26
[REACTOS] Spelling fixes (#5534)
Fix spellings / hyphenation: `unassociate` ; `read-only` ; `double-click`
2023-08-09 11:48:07 +02:00
Katayama Hirofumi MZ a83fedcbfa
[SHLWAPI][SHLWAPI_APITEST][SDK] SHGetIniStringW/SHSetIniStringW (#5547)
Follow-up to #5531. These two functions are necessary for INI file property bag support.
- Implement SHGetIniStringW and SHSetIniStringW.
- Strengthen SHPropertyBag testcase of shlwapi_apitest.
CORE-9283
2023-08-09 08:23:33 +09:00
Katayama Hirofumi MZ 70e05170cf
[MSPAINT][ATL] Delete deprecated functions (#5542)
- Rewrite CImageDx to reduce improper dependency with CImage.
- Check if the filename extension is supported before saving the files.
- Delete deprecated functions in CImage.
CORE-19094
2023-08-09 08:17:07 +09:00
Katayama Hirofumi MZ ea97c48909
[SHELL32][SDK] Implement SHCreatePropertyBag (#5541)
- Implement SHCreatePropertyBag function in utils.cpp.
- Add its prototype to <undocshell.h>.
CORE-9283
2023-08-07 17:02:39 +09:00
Katayama Hirofumi MZ 63fae07d12
[SHELL32][SDK] Implement SHIsTempDisplayMode (#5523)
CORE-9277
2023-08-07 09:50:30 +09:00
Hermès Bélusca-Maïto 9632235a37
[SDK:ASM][NDK] Adjust the x86 definition of PCR (for UP and MP). 2023-08-06 17:29:06 +02:00
Hermès Bélusca-Maïto 5f477e0e3b
[SDK:ASM][NDK] Improve and synchronize the definition of the SYNCH_LEVEL symbol (#3943)
In particular, for a given platform (x86, AMD64...) its definition
depends for uniprocessor vs. multiprocessor NT kernel/HAL (controlled
by the CONFIG_SMP define).

Regarding the ASM-generated headers (from asm/ksx.template.h), since
they are generated once for a given platform, and since UP/MP NT builds
are generated at the same time, these headers need to contain both
SYNCH_LEVEL definitions controlled by CONFIG_SMP, instead of a fixed
value. Therefore we need to employ the geninc RAW(...) construct.

[NDK:X86] Add missing x86 CLOCK1_LEVEL and POWER_LEVEL definitions.
2023-08-06 17:28:51 +02:00
Hermès Bélusca-Maïto f350843948
[SDK:ASM] OK these definition entries are #if 0'ed out, but close the parentheses anyway to not mess up with editors' code-folding functionality. 2023-08-06 17:24:41 +02:00
Andrei Miloiu 5210ad48c7
[NET][MC] Update Romanian (ro-RO) translation for message table (#5453) 2023-08-06 13:59:26 +02:00
Katayama Hirofumi MZ b4684e9809
[SHLWAPI][SHLWAPI_APITEST][SDK] SHCreatePropertyBagOnRegKey (#5531)
Follow-up to #5511.
- Add CRegPropertyBag class.
- Implement SHCreatePropertyBagOnRegKey function by using CRegPropertyBag.
- Strengthen SHPropertyBag testcase in shlwapi_apitest.
CORE-9283
2023-08-06 20:54:55 +09:00
Adam Słaboń 2ffcda90b2 [CMAKE][MVDM] Fix CMAKE_ASM16_COMPILER for non-x86 MSVC builds
Ensure that CMAKE_ASM16_COMPILER is 32-bit MASM.
It is used only for compiling 16-bit x86 ASM code on non-x86 builds.

Original patch by serrox. CORE-10452, CORE-17604

Co-authored-by: Sergey Chernov <serrox@ya.ru>
2023-08-05 16:20:22 +02:00
Katayama Hirofumi MZ 36a35ee203
[ATL] CImage: Hack fix for getting filter string (#5528)
- Fix the crash on opening/saving file.
- To get the filename extension info from CODECs, we have to keep gdiplus.dll loaded.
- The perfect fix will take time.
CORE-19093, CORE-19094
2023-08-05 21:23:21 +09:00
Katayama Hirofumi MZ b4bc6f0a6a
[SHLWAPI][SHLWAPI_APITEST][SDK] SHCreatePropertyBagOnMemory (#5511)
- Add propbag.cpp.
- Add CBasePropertyBag / CMemPropertyBag classes.
- Implement SHCreatePropertyBagOnMemory.
- Strengthen SHPropertyBag testcase in shlwapi_apitest.
CORE-9283
2023-08-05 21:20:58 +09:00
Katayama Hirofumi MZ 358e45d33a
[SHELL32][SHELL32_APITEST][SDK] Implement SheRemoveQuotesA/W (#5517)
- Implement SheRemoveQuotesA and SheRemoveQuotesW functions.
- Add She testcase into shell32_apitest.
- Add SheRemoveQuotesA/W into <undocshell.h>.
CORE-9277
2023-08-05 19:44:13 +09:00
Katayama Hirofumi MZ 329df0a9e6
[SDK] Add SHPropertyBag_ReadInt/WriteInt prototype (#5522)
Add SHPropertyBag_ReadInt / SHPropertyBag_WriteInt into <shlwapi_undoc.h>.
CORE-9283
2023-08-04 22:53:07 +09:00
Katayama Hirofumi MZ 2e9d03da90
[SHELL32][SDK] Implement SHLimitInputCombo (#5521)
SHLimitInputCombo function sets limits on valid characters for a combobox control.
This function works like SHLimitInputEdit, but the target is a combobox instead of a textbox.
CORE-9277
2023-08-04 22:29:05 +09:00
Katayama Hirofumi MZ 6299340c45
[SHLWAPI][SHLWAPI_APITEST][SDK] Implement SHPropertyBag_ReadGUID etc. (#5491)
- Implement SHPropertyBag_ReadGUID and SHPropertyBag_ReadStream functions.
- Modify shlwapi.spec and shlwapi_undoc.h.
 CORE-9283
2023-08-02 10:35:25 +09:00
Katayama Hirofumi MZ 50774f865c
[ATL] CImage: Respect CODEC info (#5408)
Add _getAllEncoders and _getAllDecoders helper functions and use them
in GetImporterFilterString, GetExporterFilterString, FileTypeFromExtension
and GetClsidFromFileType functions.
CORE-18867, CORE-19008
2023-07-31 07:22:38 +09:00
Katayama Hirofumi MZ 985680068c
[ATL] Overload const-return-versions of FindChar/FindString/FindOneOf (#5473)
Overload the const-return-versions of FindChar/FindCharReverse/FindString/FindOneOf.
Modify CStringT::Replace.
2023-07-30 07:59:01 +09:00
Katayama Hirofumi MZ 02b65773a3
[SHLWAPI][SHLWAPI_APITEST][SDK] Implement SHPropertyBag_ReadBSTR etc. (#5487)
- Implement SHPropertyBag_ReadBSTR, SHPropertyBag_ReadStr, SHPropertyBag_ReadPOINTL,
SHPropertyBag_ReadPOINTS, and SHPropertyBag_ReadRECTL functions.
- Add link to oleaut32 in shlwapi_apitest.
CORE-9283
2023-07-27 11:06:49 +09:00
Katayama Hirofumi MZ fe440f7514
[SHLWAPI][SHLWAPI_APITEST][SDK] Implement SHPropertyBag_ReadDWORD etc. (#5479)
- Add VariantChangeTypeForRead helper function.
- Implement SHPropertyBag_ReadType, SHPropertyBag_ReadBOOL, SHPropertyBag_ReadBOOLOld, SHPropertyBag_ReadSHORT, 
SHPropertyBag_ReadLONG, and SHPropertyBag_ReadDWORD functions.
- SHPropertyBag_ReadInt is an alias to SHPropertyBag_ReadLONG.
CORE-9283
2023-07-26 08:21:47 +09:00
Katayama Hirofumi MZ 57ce30b85f
[SHLWAPI][SHLWAPI_APITEST][SDK] Implement SHPropertyBag_WritePOINTL etc. (#5474)
- Implement SHPropertyBag_Delete, SHPropertyBag_WritePOINTL, SHPropertyBag_WritePOINTS, and SHPropertyBag_WriteRECTL functions.
- SHPropertyBag_WriteInt is an alias to SHPropertyBag_WriteLONG.
- Modify shlwapi.spec.
- Modify shlwapi_undoc.h.
- Add SHPropertyBag testcase to shlwapi_apitest.exe.
CORE-9283
2023-07-25 18:19:22 +09:00
Katayama Hirofumi MZ dad99e3bd0
[SHLWAPI][SDK] Implement SHPropertyBag_WriteDWORD etc. (#5467)
CORE-9283
2023-07-24 07:12:05 +09:00
Jérôme Gardou ea331f074c [FRAMEDYN] Do not define GCC <-> MSVC aliases when building the DLL
This fixes some issue when compiling without optimizations on GCC
2023-07-23 23:58:42 +02:00
Jérôme Gardou 5508673dd5 [TXT2NLS] Explicitly include <cstdint> 2023-07-23 23:58:42 +02:00
Joachim Henze e387e24611
[DMILIB][UDMIHELP] Favor pragma once (#5472) 2023-07-23 22:52:07 +02:00
Adam Słaboń ce2d4740a6
[SDK][HAL] Enable x86Bios on x86 (#5454)
This will be needed for compatibility with x86 Windows Vista/7 videoprt.sys builds.
Might be also useful in future for platforms (x86 , ...) where V86 mode is not available or buggy.

CORE-11954, CORE-18185
2023-07-20 21:44:44 +02:00
Katayama Hirofumi MZ 1191bcaf03
[ATL][ATL_APITEST] Add <atlconv.h> and atlconv testcase (#5449)
- Add <atlconv.h> header file.
- Add atlconv testcase to atl_apitest.exe.
CORE-16668
2023-07-20 07:54:11 +09:00
Katayama Hirofumi MZ 726c46d2da
[CMD][SDK][WINSRV] DIR command: Consider double-width characters (#5442)
The "dir /w" command didn't look good due to unaligned columns.
- Add sdk/include/reactos/cjkcode.h header file.
- Add ConGetTextWidthA/W helper functions.
- Add base/shell/cmd/wcwidth.c to implement ConGetTextWidthW.
- Use ConGetTextWidth in DirPrintWideList function.
- Adjust some STRING_DIR_HELP5, STRING_DIR_HELP6 and STRING_DIR_HELP8 resource strings to make the column aligned.
CORE-17591
2023-07-17 07:03:22 +09:00
Andrei Miloiu aff9e90f31
[NETEVENT][MC] Add Romanian (ro-RO) translation to message table (#5431) 2023-07-17 00:16:45 +03:00
Dmitry Borisov c0c57e2324 [PCIIDEX] Improve and fix the driver
- Fix IRP handling, add missing IRP handlers
- Specify the device name for DO
- The legacy IRQ descriptor is edge-triggered
- Improve pool tagging
- Place the PNP code in a pageable section

CORE-17256
2023-07-16 13:20:30 +03:00
Dmitry Borisov 293fc8dc34 [DDK:IDE] Add SAL2 annotations 2023-07-16 13:20:30 +03:00
Eric Kohl 0616df11e6 [PSDK] Fix issues with callback function type declarations 2023-07-15 12:59:06 +02:00
Eric Kohl c0e70a8e31 [PSDK] Add the netsh.h header file 2023-07-10 22:30:36 +02:00
Katayama Hirofumi MZ 4ff55ad48e [ATL] atlimage.h: s/IsGuidEqual/::IsEqualGUID/
CORE-18867
2023-07-06 08:29:45 +09:00
Katayama Hirofumi MZ 17e9dcc922
[RTL][ADVAPI32_APITEST] RtlIsTextUnicode: Don't change weight unless lead-byte flag (#5396)
- Fix the garbled characters (a.k.a. mojibake) in some Japanese text files.
- weight will remain 3 unless IS_TEXT_UNICODE_DBCS_LEADBYTE flag is set.
- Strengthen advapi32_apitest IsTextUnicode testcase.
CORE-19016
2023-07-05 12:01:42 +09:00
Hermès Bélusca-Maïto 122eaeb6ad
[VIDEOPRT] VideoPortGetAccessRanges: Add doxygen doc, SAL annotations and minor formatting. 2023-06-28 17:22:00 +02:00
Hermès Bélusca-Maïto de6313d89e
[VIDEOPRT] Reformat VideoPortVerifyAccessRanges()
Fix indentation, add SAL annotations and Doxygen description.
2023-06-25 21:25:07 +02:00
Hermès Bélusca-Maïto bd5209d9f4
[HALX86] These HalpNo* functions are actually _implemented_. Document their purpose.
Remove the misleading comment in HalpNoBusData().
Update the SAL annotations.
2023-06-25 21:25:06 +02:00
Oleg Dubinskiy e034377b51
[WIN32SS][ENG][NTDDRAW] Manage DirectDraw instances when switching display mode (#4519)
CORE-17932

[ENG] Implement DirectDraw management in switch display mode functions
(e.g. resolution change, color depth, display frequency etc.):

- Switch DirectDraw instances between the two PDEVs (the current one and
  the new one allocated by ourselves) by calling dxg!DxDdDynamicModeChange
  function.

- Suspend them before and resume after the display mode switch, by calling
  dxg!DxDdsuspendDirectDraw and dxg!DxDdResumeDirectDraw appropriately.

We currently don't have these functions implemented, but MS DXG has, so
it allows to properly manage DirectDraw PDEVs using this driver, similarly
to Windows.
My analysis confirms that these functions are always called in XP/2k3 on
display mode switch, even when there is no any DirectX app running at the
moment. Analyzing their prototypes show that my guesses are correct.

- Initialize hDev and dhpdev members for EDD_DIRECTDRAW_GLOBAL for newly
  created surfaces, switch them during mode change and re-initialize after
  it also. They are commonly used by DirectDraw stack.
  In addition, enable DirectDraw for old and new PDEVs, by calling
  dxg!DxDdEnableDirectDraw function.


[NTDDRAW] Additionally, fix usage of DirectDraw lock count in the PDEVOBJ
structure.

- Enable cDirectDrawDisableLocks member for storing its value, instead of
  DxDd_nCount, which is marked as ROS-specific.

- Use it in win32k!DxEngGet/SetHdevData for getting/setting DirectDraw
  count appropriately.

My analysis also shows that in Windows, the PDEVOBJ::cDirectDrawDisableLocks
method calls DxEngGetHdevData with type 8, which corresponds to our DxDd_nCount.
So there are no doubts that this member is used there.

- Rename DxEngGetHdevData_dd_count alias of type 8 to DxEngGetHdevData_dd_locks,
  to match more accurately an actual member name. Update the enumeration
  and fix all code parts appropriately.

All these changes allow to properly change display mode during executing
DirectDraw applications, when they try to switch in full-screen mode.
At least a bugcheck that happened before my changes, does no longer appear.

There are still some games that don't run correctly, as if there is no
3D acceleration (which actually exists). This requires further investigations.
2023-06-21 18:00:24 +02:00
Hermès Bélusca-Maïto 0fbd5eda85
[DDK] storport.h: Add some missing definitions that are in common with srb.h 2023-06-19 21:10:49 +02:00
Hermès Bélusca-Maïto b12069d670
[DDK] srb.h: Introduce Win8+ SCSI_MAXIMUM_BUSES_PER_ADAPTER and comment about the old SCSI_MAXIMUM_* variables. 2023-06-19 21:10:44 +02:00
Hermès Bélusca-Maïto 3bdc062fb9
[PSDK][NDK] Update SYSTEM_PERFORMANCE_INFORMATION definition with Win7+ members.
See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/performance.htm
for more information.
2023-06-15 12:55:08 +02:00
Eric Kohl c3db5e9c8e [ADVAPI32][SECLOGON] CreateProcessWithLogonW: Pass the environment to the callee 2023-06-10 14:10:14 +02:00
Hermès Bélusca-Maïto 2674e26cbb
[NTOS:IO] Reformat iorsrce.c, no functional code changes.
- Fix whitespace; add SAL annotations, doxygen documentation...

- Deduplicate the array of description strings corresponding to
  IO_QUERY_DEVICE_DATA_FORMAT.

- Unhardcode the "[3]" into 'IoQueryDeviceMaxData': the maximum number
  of device data queried.
2023-06-04 21:40:07 +02:00
Hermès Bélusca-Maïto 509359b3ec
[DDK] Add some documentation about the VIDEO_HARDWARE_CONFIGURATION_DATA structure. 2023-06-04 21:40:06 +02:00
Hermès Bélusca-Maïto 2e305b251b
[DDK] Correct PERF_CONFIGURATION_DATA definition. 2023-06-04 21:40:05 +02:00
Hermès Bélusca-Maïto 8d242c6229
[SDK] Add CONFIGURATION_TYPE definition back in arc.h
The definition is also in xdk/iotypes.h and ntddk.h around _ARC_DDK_
for compatibility, but arc.h should also be self-contained regarding
ARC definitions.
2023-06-04 21:40:04 +02:00
Hermès Bélusca-Maïto 789a296c43
[SDK:XBOX] Add missing 'VOID' in empty function prototypes. 2023-06-04 21:40:03 +02:00
Hermès Bélusca-Maïto 6db0d24fb6
Fix typo "managment" -> "management" in our codebase...
... except for 3rd-party code or "official" names.
2023-06-04 21:39:56 +02:00
Timo Kreuzer 15fbcc19b9 [NTOS:KE/x64] Fix KiConvertToGuiThread
- Do not allocate a new stack, if the thread already has a large one. This prevents the function from freeing a large stack as a normal stack and subsequently leaking system PTEs.
- Fix the check for failure of PsConvertToGuiThread (test eax, not rax, for being negative, because by default rax is zero extended from eax, not sign extended). This fixes an infinite loop on failure.
2023-05-16 22:03:13 +03:00
Katayama Hirofumi MZ 4aff629302
[IMM32][NTUSER][SDK] Add ImmCallImeConsoleIME (#5271)
- Add <jpnvkeys.h>.
- Add imm32!ImmCallImeConsoleIME.
CORE-11700
2023-05-10 14:04:01 +09:00
Katayama Hirofumi MZ 8b948ff062
[KERNEL32][SDK] RegisterConsoleIME and UnregisterConsoleIME (#5270)
The conime.exe program exists in WinXP/Win2k3 and it realizes Console IME. conime.exe calls kernel32!RegisterConsoleIME and kernel32!UnregisterConsoleIME. To realize Console IME, these two functions are required. CORE-11700
2023-05-07 22:55:46 +09:00
Justin Miller f2a58733e8
[FREELDR][SDK] Build UEFI bootloader for ARM32 (#5196)
CORE-17604

- Disable some functions for ARM32;
- Remove some link options not used on ARM;
- Add get _controlfp() to LIBCNTPR to link properly on ARM;
- Unify Freeldr UI Drawing on ARM;
- Add qemu UART debugging for ARM32/ARM64.
2023-05-03 20:56:06 +02:00
Mark Jansen 507aae4c30
[ATL] Take _ATL_FREE_THREADED into account
When it is not defined, COM should not be initialize multithreaded
2023-04-27 16:29:21 +02:00
Mark Jansen 08d808cc44
[ATL] Add CAtlList::SwapElements 2023-04-26 22:48:29 +02:00
Mark Jansen d12880829f
[ATL] Add OBJECT_ENTRY_AUTO for simpler com object registration
Of course gcc needs a nasty hack to include the symbol.
CORE-18936
2023-04-22 21:23:55 +02:00
Mark Jansen bf29d98a54
[PSDK] Add some more argument names 2023-04-22 18:31:49 +02:00
Mark Jansen 9c8580a1e0
[ATL] Add CString::AppendFormat 2023-04-17 18:09:34 +02:00
Adam Słaboń 7d71456144 [MKISOFS] Fix MSVC build on ARM hosts
Check also for MSVC target machine macros on ARM
2023-04-16 18:53:54 +02:00
Timo Kreuzer 93dface84e [PSEH] Change return type of filter function prototype to avoid broken return from inside it. 2023-04-14 11:56:08 +03:00
Joachim Henze 99e5f51d5b
[SDK] Shorten autogenerated Copyright strings (#5210)
that we do compile into almost every dll and exe.
Reduces unnecessary scrolling in the
Versions tab of file properties dlg, which precedes the Copyright phrase anyway.

MS also uses shorter strings and therefore doesn't require to scroll at all.
See attached screenshots in the PR.
2023-04-04 12:10:59 +02:00
Katayama Hirofumi MZ 29e147beca
[MSPAINT][ATL] Encapsulation: mainWindow (#5178)
- Add DoCreate methods to CFullscreenWindow, CMiniatureWindow, and CMainWindow classes.
- Do encapsulation around mainWindow and _tWinMain.
- Add GetOpenFileName, GetSaveFileName, and ChooseColor helper methods to CMainWindow class.
- Move some code in WinMain into CMainWindow::OnCreate.
- Delay creation of CFullscreenWindow and CMiniatureWindow.
- Extend ATL CImage class as CImageDx in newly-created atlimagedx.h of mspaint.
CORE-18867
2023-03-28 22:31:26 +09:00
Dmitry Borisov 557306f5c0
[DDK:NDIS] Fix definition of broadcast address macro (#5155)
ff:ff:ff:ff:ff:ff is the broadcast MAC address.

CORE-8724
2023-03-18 16:57:52 +01:00
Hermès Bélusca-Maïto f6c8155239
[SDK] driverspecs.h: Add missing dummy _IRQL_limited_to_() definition (when _PREFAST_ is not defined).
Addendum to commit 8a688204.
2023-03-18 03:42:26 +01:00
Hermès Bélusca-Maïto e241c87eea
[SDK] sdkddkver.h: Add NTDDI_* defines for newest Windows 10 and 11 versions.
And add version descriptions, especially for Windows 10 as it becomes messy.

Information from:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlisntddiversionavailable
- Shared/sdk/extdef.h from https://github.com/Mattiwatti/WinObjEx64
- Descriptions from https://github.com/MiroKaku/Veil
- Cross-checked with headers from https://github.com/microsoft/wil
2023-03-14 00:14:12 +01:00
Hermès Bélusca-Maïto a8b09eddc4
[NTOS:KD] Add some annotations. 2023-03-09 18:32:36 +01:00
Mark Jansen 5bc045c041
[SDK:SCRNSAVE] Implement mouse move threshold.
This makes it easier to start the screensavers by double-clicking.
2023-03-08 20:19:19 +01:00
Katayama Hirofumi MZ fdedc549d0 [MSVCRT] Follow-up of Follow-up of #5032 (f172503)
Fix for system/_wsystem.
Use _set_errno(ENOMEM) for malloc failure.
Rename status variable as exit_code.
2023-03-05 23:28:00 +09:00
Katayama Hirofumi MZ 5a7dbd6064 [MSVCRT] Follow-up of #5032 (f172503)
Use _cwait() instead of WaitForSingleObject and GetExitCodeProcess.
Use malloc/free instead of LocalAlloc/LocalFree.
2023-03-05 23:20:12 +09:00
Katayama Hirofumi MZ f172503d57
[MSVCRT][CRT_APITEST] Implement _wsystem (#5032)
Implement _wsystem(), by referring system().
Improve system().
Use WaitForSingleObject in system() and _wsystem().
Check existence of COMSPEC.
Thanks ChatGPT.
2023-03-05 21:01:14 +09:00
Joachim Henze 0fb580a855
[SDK] Improve gen_baseaddress.py and its output files (#4964)
* [SDK:TOOLS] Improve gen_baseaddress.py

Adds some kbd layout modules into the excludes-section:
that we do lack for todays master: e.g._ kbdeo, kbdsf, kbdrost

and also some that we lacked in the past
(for improving backwards compatibility of the script to older rls-branches):
kbdgm, kbdes, kbdgrist, kbdja, kbdko, kbdsk, kbdsk1

* [SDK:CMAKE] Highlight in the output files where the script does misbehave
2023-03-04 11:45:06 +01:00
Mark Jansen 647f74d4ab
[ATL] Remove some code that doesn't exist in the native ATL 2023-02-20 19:32:59 +01:00
Katayama Hirofumi MZ 38c0da9978
[CRT] printf/wprintf: Support %zu (#5056)
"%zu" is a printf format specifier for type size_t. Some apps assume the implementation of this specifier. CORE-17787
2023-02-14 20:54:53 +09:00
Joachim Henze 09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Timo Kreuzer 9d19f8bf65 [WINESYNC] msvcrt: Use memmove to copy memory in memcpy_s.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 055ca5e4d9770d4f14e3c157f1288fa6308b86dd by Jacek Caban <jacek@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 6b8a981010 [WINESYNC] msvcrt: Use memmove to copy memory in wmemcpy_s.
Fixes memory corruption in Outlook 2016.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id be56a83fd00cdaf9583a973b1e041f47c5277768 by Jacek Caban <jacek@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer c50fb470b4 [WINESYNC] msvcrt: Add DECLSPEC_HOTPATCH to functions patched by libtcmalloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b917cc66f4f7b786e7f19f63ab0c0819a5455222 by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 3ff17d5d71 [WINESYNC] msvcrt: Don't include MSVC 8.0+ heap functions in SOs for older DLLs.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 42ab0af66b74f7572db2f6d0256f49fae7527221 by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 8fdc1b0d38 [WINESYNC] msvcrt: Add helper for exception throwing.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 90307e067f985f5963b62829993b320537578333 by Piotr Caban <piotr@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 6360937cd4 [WINESYNC] ucrtbase: Implement _realloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8a69c5d81f8deb472df18a8e16e57efef2eb9a9a by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer aa77776eb0 [WINESYNC] ucrtbase: Implement _free_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id e4b8bc0edc640b36f2a2a26c53e18edea04fa74c by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 7757ebfbad [WINESYNC] ucrtbase: Implement _malloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 5325b8c95112be75f4fa0e2e2e45bcc88434fb5d by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 0dfd5665c0 [WINESYNC] ucrtbase: Implement _calloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fdc57d497bb305e90680c3b450fa172042fd79cd by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 1d6ec8555d [WINESYNC] msvcrt: Handle overflow in calloc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 50dd4b892825c75db35cd1f378291b51fa782f3e by Nikolay Sivov <nsivov@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 977e236102 [WINESYNC] msvcrt: memmove_s shouldn't zero its output buffer on error.
wine commit id 49560458426cf25b6a36bbf9bad35aa75c9f7aa7 by Dan Kegel <dank@kegel.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 8fa0886fb9 [CRT] Reduce diff to wine by adjusting white space 2023-02-02 14:58:08 +01:00
Gabriel Grondin 144e984b40 [ZLIB] Update to v1.2.13. CORE-18752 2023-02-02 02:18:39 +03:00
Victor Perevertkin 1734f29721 [IP][LWIP][TCPIP] Move ip and lwip libraries to drivers/network/tcpip
These libraries are used only inside tcpip.sys driver so move them close
to it.
2023-02-01 02:31:14 +03:00
Victor Perevertkin 886670e914
[DRIVERS] Remove unused __NTDRIVER__ and KERNEL definitions 2023-01-31 20:18:18 +03:00
Timo Kreuzer f34e425e1a [WINESYNC] msvcrt: Don't fail when _aligned_offset_malloc is used with size=0.
wine commit id 7771552f247660acc472b4862f32c4f8426be180 by Piotr Caban <piotr@codeweavers.com>
2023-01-24 18:53:13 +01:00
Timo Kreuzer 739c9a1e77 [WINESYNC] msvcrt: Fixed strncpy_s behavior when count equals 0.
wine commit id bdf9a9f9bd56354f70a7431a9682183b84353211 by Piotr Caban <piotr@codeweavers.com>
2023-01-24 18:53:13 +01:00
Timo Kreuzer c36ea58f32 [CRT] Add a number of functions from wine
This adds _aligned_msize, _recalloc, wmemmove_s, memcpy_s, wmemcpy_s
2023-01-24 18:53:13 +01:00
Timo Kreuzer d0a52a6d71 [CRT] Reduce diff
- use msvcrt_set_errno
- MSVCRT_CHECK_PMT already sets the error.
- NULL check is already in HeapFree
2023-01-24 18:53:13 +01:00
Timo Kreuzer c47506a5f4 [CRT] Use the original wine heap functions 2023-01-24 18:53:13 +01:00
Timo Kreuzer cf40758d76 [CRT] reduce diff to wine of heap code
No functional changes intended.
2023-01-24 18:53:13 +01:00
Timo Kreuzer 73ef1c3c8b [CRT] Get back MSVCRT prefix in wine heap code 2023-01-24 18:53:13 +01:00
Ratin Gao 21a168e574
[ATL] CImage::Load(): Return E_FAIL without ATLASSERT on failure (#4993)
Application won't be interrupted by ATLASSERT when image load failure happens,
just like it was done in MS ATL.

CORE-18589
2023-01-22 20:38:16 +03:00
Hermès Bélusca-Maïto 1b25fe161c
[KERNEL32][NTOS:PS][RTL] Cleanup some DbgPrompt() calls. 2023-01-06 14:44:49 +01:00
Hermès Bélusca-Maïto 2714e3ee48
[LIBWINE] Fix GCC build warning. (#4938)
In file included from ../sdk/lib/3rdparty/libwine/debug_ros.c:9:
../sdk/lib/3rdparty/libwine/debug.c: In function 'get_temp_buffer':
../sdk/lib/3rdparty/libwine/debug.c:343:33: warning: passing argument 1 of '_InterlockedExchangeAdd' from incompatible pointer type [-Wincompatible-pointer-types]
     idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
                                 ^~~~
In file included from ../sdk/include/crt/mingw32/intrin.h:98,
                 from ../sdk/include/crt/intrin.h:1017,
                 from sdk/include/psdk/winnt.h:48,
                 from ../sdk/include/psdk/windef.h:202,
                 from ../sdk/include/reactos/wine/debug.h:26,
                 from ../sdk/lib/3rdparty/libwine/debug.c:32,
                 from ../sdk/lib/3rdparty/libwine/debug_ros.c:9:
../sdk/include/crt/mingw32/intrin_x86.h:215:70: note: expected 'volatile long int *' but argument is of type 'int *'
 __INTRIN_INLINE long __cdecl _InterlockedExchangeAdd(volatile long * Addend, long Value)
                                                      ~~~~~~~~~~~~~~~~^~~~~~
2023-01-06 13:17:21 +01:00
Timo Kreuzer 902cdbc63a [ATL] Remove an assert that doesn't exist in the native ATL
This fixes an ATL assert in shell32_winetest:assoc and shell32_winetest:shfldr_special
2023-01-04 10:32:28 +01:00
Timo Kreuzer 2154e259e7 [PSDK] Fix definition of DRVCALLBACK for 64 bit 2023-01-04 10:32:28 +01:00
Hermès Bélusca-Maïto 95e5f07084
🎊 🍾 🥳 Happy New Year 2023 to the ReactOS Community! 🎆 ⚛️ ☢️
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
 __,  ,__)            __,  ,__)       __, ,__)        ░▄████▄░▄███▄░▄████▄░▄█▀▀█▄░
(--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_   ░▀▀░▄██░██░██░▀▀░▄██░░░░▄█▀░
  _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||    ░░▄██▀░░██░██░░▄██▀░░▄░▀▀█▄░
 (        |  |  ,_|   (                (__|           ░██████░▀███▀░██████░▀█▄▄█▀░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
2023-01-01 00:00:00 +03:00
George Bișoc bfe06cbfca
[SDK][CMLIB] Properly check for failure if hive free list creation fails
HvpCreateHiveFreeCellList returns a NTSTATUS code yet the way the code path checks
checks for failure is just wrong. This was spotted whilst working on #4571 PR.
2022-12-30 19:58:37 +01:00
Timo Kreuzer 3b437b8a1c [NDK] Fix definition of RTL_DEBUG_INFORMATION
Fixes ntdll_aiptest RtlDebugInformation on x64
2022-12-30 11:19:26 +01:00
Timo Kreuzer 918c98a239 [NDK] Fix definition of LDR_ENUM_RESOURCE_INFO
This fixes ntdll_apitest LdrEnumResources on x64 Windows
2022-12-30 11:19:26 +01:00
Mark Jansen a09d5bae0f
[LOG2LINES] Compile the tool for MSVC builds 2022-12-29 16:51:40 +01:00
George Bișoc 578f2fc512
[NTOS:CM] Don't lazy flush the registry during unlocking operation
Whenever ReactOS finishes its operations onto the registry and unlocks it, a lazy flush is invoked to do an eventual flushing of the registry to the backing storage of the system. Except that... lazy flushing never comes into place.

This is because whenever CmpLazyFlush is called that sets up a timer which needs to expire in order to trigger the lazy flusher engine worker. However, registry locking/unlocking is a frequent occurrence, mainly when on desktop. Therefore as a matter of fact, CmpLazyFlush keeps removing and inserting the timer and the lazy flusher will never kick in that way.

Ironically the lazy flusher actually does the flushing when on USETUP installation phase because during text-mode setup installation in ReactOS the frequency of registry operations is actually less so the timer has the opportunity to expire and fire up the flusher.

In addition to that, we must queue a lazy flush when marking cells as dirty because such dirty data has to be flushed down to the media storage of the system. Of course, the real place where lazy flushing operation is done should be in a subset helper like HvMarkDirty that marks parts of a hive as dirty but since we do not have that, we'll be lazy flushing the registry during cells dirty marking instead for now.

CORE-18303
2022-12-23 19:45:13 +01:00
Timo Kreuzer dacbc603b6 [CRT] Add simplistic fallback implementation of sincos to make GCC 11 happy 2022-12-01 15:21:59 +02:00
Timo Kreuzer 28c41b7d22 [CRT] Replace amd64 math functions/stubs with libm 2022-12-01 15:21:59 +02:00
Timo Kreuzer 1ad4106b84 [CRT] Add basic version of handle_error 2022-12-01 15:21:59 +02:00
Timo Kreuzer 3d497ca883 [CRT] Improve _matherr handling 2022-12-01 15:21:59 +02:00
Timo Kreuzer 4d50f81419 [CRT] Implement _set_statfp 2022-12-01 15:21:59 +02:00
Timo Kreuzer 61cc62d1b2 [ASMPP] Implement asm preprocessor
This converts ML style assembly to GAS compatible syntax
2022-12-01 15:21:59 +02:00
Timo Kreuzer 7277e26944 [LIBM] Fix ldexp.c / ldexpf.c 2022-12-01 15:21:59 +02:00
Timo Kreuzer 4f348ee971 [LIBM] Add ldexp.c and ldexpf.c from aocl-libm-ose 2022-12-01 15:21:59 +02:00
Timo Kreuzer 105426b81a [LIBM] Fix up some asm files
This allows to compile them with GAS after translation
2022-12-01 15:21:59 +02:00
Timo Kreuzer af6d3bb18f [LIBM] Convert tables from asm to C 2022-12-01 15:21:59 +02:00
Timo Kreuzer 9e8ed3f817 [LIBM] Fix build 2022-12-01 15:21:59 +02:00
Timo Kreuzer 4afb647c78 [LIBM] Import win-libm from AMD
Source: https://github.com/amd/win-libm
2022-12-01 15:21:59 +02:00
Timo Kreuzer 081c637c06 [XDK] Silence some GCC x64 warnings 2022-12-01 15:21:59 +02:00
Timo Kreuzer 06f1ac5fa4 [CRT] Add a workaround for CORE-18255 2022-12-01 15:21:59 +02:00
Hermès Bélusca-Maïto 8398b28ae4
[PSDK] Fix x64 incompatibilities in ***Box_GetItemData(). Addendum to 6572dd7f4. 2022-11-28 15:02:39 +01:00
Thomas Faber 991e2bd45b
[LIBPNG] Update to version 1.6.39. CORE-18670 2022-11-27 10:10:53 -05:00
Thomas Faber c5febe93f0
[LIBPNG] Update to version 1.6.38. CORE-18670 2022-11-27 10:10:51 -05:00
Hermès Bélusca-Maïto 3c95c95369
[NDK] Fix description for PIO_APC_ROUTINE.
[RTL] Typo fix.
2022-11-26 02:38:52 +01:00
Thomas Faber c0027d117c
[LIBXML2] Update to version 2.10.3. CORE-17766 2022-11-25 09:30:40 -05:00
Thomas Faber 19da1718e5
[LIBXSLT] Update to version 1.1.37. CORE-17766 2022-11-25 09:30:40 -05:00
Thomas Faber 1dbad942d8
[LIBXML2] Update to version 2.10.2. CORE-17766 2022-11-25 09:30:39 -05:00
Thomas Faber 0d5a4166a4
[LIBXML2] Update to version 2.10.1. CORE-17766 2022-11-25 09:30:36 -05:00
Timo Kreuzer 66aa25b1cd [RTL] Implement RtlUnwind 2022-11-24 21:17:58 +02:00
Timo Kreuzer 8d3bc7c572 [RTL] Set unwind flags in RtlUnwindEx 2022-11-24 21:17:58 +02:00
Timo Kreuzer 0c211b975f [RTL] Fixes for RtlpUnwindInternal 2022-11-24 21:17:58 +02:00
Timo Kreuzer aade1ab01b [RTL] Fix RtlVirtualUnwind 2022-11-24 21:17:58 +02:00
Timo Kreuzer 90d2e12dfa [RTL] Fix RtlpCaptureNonVolatileContextPointers 2022-11-24 21:17:58 +02:00
Timo Kreuzer f4d4b31c61 [RTL] Implement x64 version of RtlInterlockedPushListSList 2022-11-24 21:17:58 +02:00
Timo Kreuzer 20a6cff4dd [CRT] Implement _InterlockedCompareExchange128 intrinsic for GCC 2022-11-24 21:17:58 +02:00
Hermès Bélusca-Maïto f7024d6c72
[PSDK][NTOS:KD64] Turns out, that even Clang in MSVC mode needs the 64-bits pointer extension hack!
Addendum to commit de81021ba.
Otherwise, we get the following build error:

 \ntoskrnl\kd64\kddata.c(532,5): error: initializer element is not a compile-time constant
      PtrToUL64(RtlpBreakWithStatusInstruction),
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \ntoskrnl\kd64\kddata.c(526,26): note: expanded from macro 'PtrToUL64'
 #define PtrToUL64(x)    ((ULPTR64)(x))
                          ^~~~~~~~~~~~
2022-11-24 13:30:43 +01:00
Thomas Faber 911153da10
[LIBXML2] Update to version 2.10.0. CORE-17766 2022-11-23 22:02:47 -05:00
Thomas Faber 21ab4d93c7
[LIBXSLT] Update to version 1.1.36. CORE-17766
This version was released after libxml2 2.10.0, but it removes
usage of some now-deprecated functions that would break the build.
2022-11-23 22:02:43 -05:00
Hermès Bélusca-Maïto de81021bab
[PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity.
But the underlying GCC stupidity is still there (15 years later).

However, enable it only in 32-bit GCC builds, not in 64-bits nor with MSVC.
See commit b9cd3f2d9 (r25845) for some details.

GCC is indeed still incapable of casting 32-bit pointers up to 64-bits,
when static-initializing arrays (**outside** a function) without emitting
the error:

  "error: initializer element is not constant"

(which might somehow indicate it actually tries to generate executable
code for casting the pointers, instead of doing it at compile-time).

Going down the rabbit hole, other stupidities show up:

Our PVOID64 type and the related POINTER_64 (in 32-bit archs), or the
PVOID32 and POINTER_32 (in 64-bit archs), are all silently broken in
GCC builds, because the pointer size attributes __ptr64 and __ptr32,
which are originally MSVC-specific, are defined to nothing in _mingw.h.
(And similarly for the __uptr and __sptr sign-extension attributes.)

Clang and other sane ompilers has since then implemented those (enabled
with -fms-extensions), but not GCC. The closest thing that could exist
for GCC is to do:

  #define __ptr64 __attribute__((mode(DI)))

in order to get a 64-bit-sized pointer type with

  typedef void* __ptr64 PVOID64;

but even this does not work, with the error:

  "error: invalid pointer mode 'DI'"
2022-11-24 01:18:16 +01:00
Hermès Bélusca-Maïto 1c0950b557
[PSDK][NTOS:KD64] Update the KDDEBUGGER_DATA64 structure with new fields.
Information from the Windows 10 SDK and from
https://github.com/DarthTon/Blackbone/blob/master/src/BlackBoneDrv/NativeStructs.h
2022-11-24 01:18:15 +01:00
Hermès Bélusca-Maïto 1847474aaa
[PSDK] Clarify the FIXME comment about this mysterious warning.h (here for WDK compatibility). 2022-11-24 01:18:11 +01:00
Thomas Faber 8940614a78
[LIBXML2] Update to version 2.9.14. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber 7244e0c5c6
[LIBXML2] Update to version 2.9.13. CORE-17766 2022-11-21 19:46:12 -05:00
Thomas Faber df1adce32c
[LIBXML2] Fix forgotten config.h update. CORE-17766 2022-11-21 19:46:11 -05:00
Thomas Faber f7671c1be8
[LIBXSLT] Update to version 1.1.35. CORE-17766 2022-11-21 19:46:11 -05:00
Thomas Faber e524b1bcf6
[LIBXSLT] Improve sync with upstream. CORE-17766
Makefile.am: this hasn't been updated in a while
security.c: WIN32 -> _WIN32 to keep the ROS-diff consistent with the rest
win32config.h/libxslt.h: remove unnecessary ROS-diff
xsltwin32config.h: this was missed in the 1.1.34 sync
xsltexports.h: mark a ROS-diff as such
2022-11-21 19:46:08 -05:00
Hermès Bélusca-Maïto 56be4eafd5
[NTOS:IO][NDK] Add the exported IoDeleteDriver to the NDK headers. 2022-11-18 18:11:26 +01:00
Serge Gautherie 770b3a3ce5
[HHPCOMP:CHMC] chmc_crunch_lzx(): Disable a dead check (#4880)
CORE-18642
2022-11-16 22:19:52 +01:00