This prevents the code from linking to __imp_*, which would pull in the symbol from the import library (e.g. kernel32), which creates problems with the GNU linker, which doesn't like to have the import and a static definition at the same time.
because George is having an open Draft PR since July 2022,
which might also touch this file on master in some years.
And it ofc is easier for me to revert my work now, then for him to
go through the great lengths of merging his work then.
bdasup: Addendum to 40c15ec (r46632).
kmixer: Addendum to 3e489bf (r42143).
mmixer: Addendum to c42d9f2 (r44872).
stream: Addendum to 4a0debf (r41662).
Serge plans a follow up that will remove all other remaining YDEBUG in the source tree.
The ones covered here he considered to be the most trivial ones.
Define _STLP_THREADS to make stl thread safe.
Also remove defined(__BUILDING_STLPORT) from the preprocessor conditions for which STLPInterlockedExchangePointer is defined, because that function is used in _threads.h, which can get included by apps using the stl through stl headers.
- Convert some notations to SAL2
- "Name" parameter in LdrGetProcedureAddress/LdrpGetProcedureAddress should be optional
- "DllCharacteristics" parameter in LdrGetDllHandle should be optional
- RtlpQuerySecurityDescriptor: Change argument type of first parameter from PISECURITY_DESCRIPTOR to PSECURITY_DESCRIPTOR, since it handles both absolute and self-relative SDs.
- RtlMakeSelfRelativeSD: rename first parameter from AbsoluteSD to SecurityDescriptor, since it handles both absolute and self-relative SDs.
- SepGetGroupFromDescriptor/SepGetOwnerFromDescriptor/SepGetDaclFromDescriptor/SepGetSaclFromDescriptor: Change parameter type from PVOID to PSECURITY_DESCRIPTOR for clarity.
SpareData and SpareLength need to be calculated correctly, as they are used
later in that function as well.
This allows to not overwrite Source UString when writing to Destination UString.
Fixes the problem described in the following JIRA issue, where services could
not start when installing ReactOS in a very-long-named directory.
CORE-18988
Names need decoration (stdcall) in order to be linked.
When using the wsk.h header functions exported therein should
be WSKAPI (which enforces the stdcall calling convention). Linking
would later fail because stdcall functions are named differently in
the object code.
- Implement CShellBrowser::GetPropertyBag
a little by using SHGetViewStatePropertyBag.
- Add SHGetPathFromIDListWrapW prototype to
<shlwapi_undoc.h>.
CORE-9283
Follow-up to #5610.
- Add _EnsureWriteBag, _PruneMRUTree, _GetMRUSize and
_GetMRUSlots helper functions.
- Add code into _GetMRUSlot, _FindNearestInheritBag, and Write.
- Add CLSID_MruPidlList and IID_IMruPidlList definitions into
<shlguid_undoc.h>.
- Add IMruPidlList interface into <shlobj_undoc.h>.
CORE-9283
Previously it was in cpprt, which is a support library for C++, containing functions that are not exported by msvcrt. But since Vista __CxxFrameHandler3 is exported by msvcrt. Therefore move it to crt, and to satisfy pre-Vista configurations, also add it to msvcrtex.
mkisofs and its components uses K&R-style function definitions
to support very old compilers. Modern compilers consider K&R syntax
to be deprecated. Clang therefore emits a large number of warnings
over this.
Follow-up to #5590.
- Add CViewStatePropertyBag class.
- Add SHGetViewStatePropertyBag definition.
- Add FreeViewStatePropertyBagCache function and
use it in DllMain to free the cache.
CORE-9283
Object ACEs are supported starting from Revision 4, the current code checks
if the revision is above Revision 4. An Object ACE has to be strictly set on that revision,
whereas Object ACLs can be of any revision starting from ACL_REVISION4.
Write the necessary ACL validation code for ACEs whose types are ACCESS_ALLOWED_OBJECT_ACE_TYPE
or ACCESS_DENIED_OBJECT_ACE_TYPE. This ensures each created object type ACL has valid ACE
contents.
ACCESS_DENIED_ACE_TYPE, ACCESS_ALLOWED_ACE_TYPE, SYSTEM_AUDIT_ACE_TYPE and
SYSTEM_ALARM_ACE_TYPE belong to the same commonly internal ACE type, aka KNOWN_ACE,
as each of these ACEs have the same structure field offsets.
The only difference are ACCESS_DENIED_OBJECT_ACE_TYPE and ACCESS_ALLOWED_OBJECT_ACE_TYPE
as they have their own internal ACE type variant, the KNOWN_OBJECT_ACE structure.
The general guideline is that public ACE structure variants have to be used elsehwere
such as in UM whilst the kernel has to use the internal known ACE type variants when possible.
The newly updated SAL2 annotations reflect those from Process Hacker.
Also these syscalls must have their function's status code checked, as
most of other Native syscalls have them checked.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48335
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 6babdb5508bd2f1b659218483f5df76859898712 by Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 48a447c5eb238d673ce5db4eeacf3ba4c1a9da90 by Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id ea20974cdd7457715bf4d758818d03bff664f62b by Piotr Caban <piotr@codeweavers.com>
Make sure RtlRemovePrivileges gets compiled, when DLL_EXPORT_VERSION is 0x600+
Enable all existing functions from rtl_vista.
Hack CsrNewThread export to exist on later versions, too
Some datagram related dispatcher function types (like PFN_WSK_SEND_TO)
were used before they were declared. This patch moves the use after
the definition.
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
- 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
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.
Follow-up to #5511.
- Add CRegPropertyBag class.
- Implement SHCreatePropertyBagOnRegKey function by using CRegPropertyBag.
- Strengthen SHPropertyBag testcase in shlwapi_apitest.
CORE-9283
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>
- 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
- Implement SheRemoveQuotesA and SheRemoveQuotesW functions.
- Add She testcase into shell32_apitest.
- Add SheRemoveQuotesA/W into <undocshell.h>.
CORE-9277
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
Add _getAllEncoders and _getAllDecoders helper functions and use them
in GetImporterFilterString, GetExporterFilterString, FileTypeFromExtension
and GetClsidFromFileType functions.
CORE-18867, CORE-19008
- Implement SHPropertyBag_ReadBSTR, SHPropertyBag_ReadStr, SHPropertyBag_ReadPOINTL,
SHPropertyBag_ReadPOINTS, and SHPropertyBag_ReadRECTL functions.
- Add link to oleaut32 in shlwapi_apitest.
CORE-9283
- 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
- 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
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
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
- 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
- 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
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.
- 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.
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.
- 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.
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
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.
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.
- 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
Implement _wsystem(), by referring system().
Improve system().
Use WaitForSingleObject in system() and _wsystem().
Check existence of COMSPEC.
Thanks ChatGPT.
* [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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
~~~~~~~~~~~~~~~~^~~~~~
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.
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