Fix bugs in FileSystemObject text-file handling
OpenTextFile(...,ForWriting,True) should either create a new file,
or open and truncate an existing one
OpenTextFile(...,ForAppending,?,True) should write a BOM
if appending to an existing-but-empty file
--
v3: scrrun: Fix bugs in FileSystemObject text-file handling
scrrun/tests: Introduce a test_file_contents helper
https://gitlab.winehq.org/wine/wine/-/merge_requests/898
--
v3: mshtml: Silence a FIXME when parameter is missing.
mshtml: Create non-gecko events properly from type string.
mshtml: Use actual event type to create the event instead of the event id.
mshtml: Expand event_info to include a special entry for EVENTID_LAST.
mshtml: Use actual Gecko event type for MessageEvent and StorageEvent.
mshtml: Implement url prop for StorageEvent.
include/mshtml: Move some forward interface declarations to match Windows SDK.
mshtml: Override document.URL's name when adding it from the mshtml typelib.
https://gitlab.winehq.org/wine/wine/-/merge_requests/856
mrac tries to get function pointers for these functions using MmGetSystemRoutineAddress, I haven't seen them being used by it, but might as well implement it since they are very easy to implement.
--
v2: ntoskrnl.exe: Implement various KeQuery* functions
https://gitlab.winehq.org/wine/wine/-/merge_requests/914
This can happen with asynchronous decoding, such as with the VA-API
decodebin plugin for H264.
This fixes the mf transform tests crashing when VA-API plugins are used.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/913
mrac tries to get function pointers for these functions using MmGetSystemRoutineAddress, I haven't seen them being used by it, but might as well implement it since they are very easy to implement.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/914
--
v5: mf/tests: Dump image samples with a BMP header and RGB data.
mf/tests: Rename transform frame dumps to BMP.
mf/tests: Check all produced output IMFSample at the same time.
mf/tests: Factor IMFSample attributes checks in check_mf_sample.
mf/tests: Factor IMFSample checks in a check_mf_sample helper.
mf/tests: Introduce a new dump_mf_sample helper.
mf/tests: Introduce a new load_resource helper.
mf/tests: Factor IMFTransform_ProcessOutput checks together.
mf/tests: Use separate variables for input / output samples.
https://gitlab.winehq.org/wine/wine/-/merge_requests/887
Fix bugs in FileSystemObject text-file handling
OpenTextFile(...,ForWriting,True) should either create a new file,
or open and truncate an existing one
OpenTextFile(...,ForAppending,?,True) should write a BOM
if appending to an existing-but-empty file
--
v2: scrrun: Fix bugs in FileSystemObject text-file handling
https://gitlab.winehq.org/wine/wine/-/merge_requests/898
This basic implementation is sufficient to fix .NET applications that use System.Security.Principal.WindowsIdentity.AuthenticationType.
--
v5: secur32: Implement basic functionality for LsaGetLogonSessionData.
https://gitlab.winehq.org/wine/wine/-/merge_requests/907
This basic implementation is sufficient to fix .NET applications that use System.Security.Principal.WindowsIdentity.AuthenticationType.
--
v4: secur32: Implement basic functionality for LsaGetLogonSessionData.
secur32/tests: Add tests for LsaGetLogonSessionData.
https://gitlab.winehq.org/wine/wine/-/merge_requests/907
This basic implementation is sufficient to fix .NET applications that use System.Security.Principal.WindowsIdentity.AuthenticationType.
--
v3: secur32: Implement basic functionality for LsaGetLogonSessionData.
secur32/tests: Add tests for LsaGetLogonSessionData.
https://gitlab.winehq.org/wine/wine/-/merge_requests/907
This basic implementation is sufficient to fix .NET applications that use System.Security.Principal.WindowsIdentity.AuthenticationType.
--
v2: secur32: Implement basic functionality for LsaGetLogonSessionData.
https://gitlab.winehq.org/wine/wine/-/merge_requests/907
VariantCopyInd allows pvargDest == pvargSrc in order to dereference in place
To avoid confusing the source values and a partially-written destination,
wine's implementation makes a shallow copy and uses that as pSrc.
However, the call to VARIANT_CopyIRecordInfo did not use this,
leading to it copying from the zeroed-out memory it just allocated.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/897
Apex Legends game periodically (every 30 seconds) calls this function
with up to 22k virtual addresses. All but 1 of them is valid. Due to
amount of queries addresses, and cost of seek+read, this causes this
function to take up to about 50ms. So framerate drops from ~150 FPS to
20FPS for about a second.
As far as I can see, returning 0 entries from this function, still makes
Apex Legend work.
But keep code correct, and optimise it by:
1. Opening pagemap file once, and never closing it. This eliminates
repeated fopen/fseek/fread/fclose sequences, which helps even in queries
with small amount of virtual addresses.
2. Using pread, instead of seek+read.
3. Only performing pagemap read when the address is valid.
Future work might recognize continues pages in the query, and perform a
batch read of multiple pagemap entries, instead one page at a time, but
for now it is not necassary.
This change get_working_set_ex peek wall clock runtime from 57ms to
0.29ms.
Tested on Linux, but similar change done for the BSD part.
`Signed-off-by: Witold Baryluk <witold.baryluk(a)gmail.com>`
--
v17: ntdll: Keep pagemap file open after first use of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
https://gitlab.winehq.org/wine/wine/-/merge_requests/852
Apex Legends game periodically (every 30 seconds) calls this function
with up to 22k virtual addresses. All but 1 of them is valid. Due to
amount of queries addresses, and cost of seek+read, this causes this
function to take up to about 50ms. So framerate drops from ~150 FPS to
20FPS for about a second.
As far as I can see, returning 0 entries from this function, still makes
Apex Legend work.
But keep code correct, and optimise it by:
1. Opening pagemap file once, and never closing it. This eliminates
repeated fopen/fseek/fread/fclose sequences, which helps even in queries
with small amount of virtual addresses.
2. Using pread, instead of seek+read.
3. Only performing pagemap read when the address is valid.
Future work might recognize continues pages in the query, and perform a
batch read of multiple pagemap entries, instead one page at a time, but
for now it is not necassary.
This change get_working_set_ex peek wall clock runtime from 57ms to
0.29ms.
Tested on Linux, but similar change done for the BSD part.
`Signed-off-by: Witold Baryluk <witold.baryluk(a)gmail.com>`
--
v16: ntdll: Keep pagemap file open after first use of NtQueryVirtualMemory(MemoryWorkingSetExInformation)
https://gitlab.winehq.org/wine/wine/-/merge_requests/852
On Wed Sep 21 21:29:50 2022 +0000, Alexandre Julliard wrote:
> > Code should be obvious, but question for the last commit: should I
> open with `O_CLOEXEC` ?
> Yes, you should. grep for O_CLOEXEC to see how this is handled in other
> places when not supported.
Makes sense. Done.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/852#note_9007