winehq.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
2025
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2020
----- 2025 -----
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
743 discussions
Start a n
N
ew thread
Paul Gofman : include/ddk: Update the IMAGE_INFO structure.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: a5b5be497913b0e9cb5c53ce37c6c81f1cc02093 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a5b5be497913b0e9cb5c53ce…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:09 2020 +0300 include/ddk: Update the IMAGE_INFO structure. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/ddk/ntddk.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/ddk/ntddk.h b/include/ddk/ntddk.h index 36f69cdf9a..e3c9124023 100644 --- a/include/ddk/ntddk.h +++ b/include/ddk/ntddk.h @@ -107,6 +107,8 @@ typedef enum _CONFIGURATION_TYPE MaximumType } CONFIGURATION_TYPE, *PCONFIGURATION_TYPE; +#define IMAGE_ADDRESSING_MODE_32BIT 3 + typedef struct _IMAGE_INFO { union @@ -118,7 +120,11 @@ typedef struct _IMAGE_INFO ULONG SystemModeImage : 1; ULONG ImageMappedToAllPids : 1; ULONG ExtendedInfoPresent : 1; - ULONG Reserved : 21; + ULONG MachineTypeMismatch : 1; + ULONG ImageSignatureLevel : 4; + ULONG ImageSignatureType : 3; + ULONG ImagePartialMap : 1; + ULONG Reserved : 12; } DUMMYSTRUCTNAME; } DUMMYUNIONNAME; PVOID ImageBase;
1
0
0
0
Paul Gofman : ntoskrnl.exe: Implement IoReuseIrp() function.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: eb7f7847610f73d3ce76169c8b4603fe5a13addb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb7f7847610f73d3ce76169c…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:08 2020 +0300 ntoskrnl.exe: Implement IoReuseIrp() function. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 11 +++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- dlls/ntoskrnl.exe/tests/driver.c | 37 +++++++++++++++++++++++++++++++++++++ include/ddk/wdm.h | 1 + 4 files changed, 50 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 3c8b207a4a..e9c35cf7e3 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -975,6 +975,17 @@ void WINAPI IoInitializeIrp( IRP *irp, USHORT size, CCHAR stack_size ) (PIO_STACK_LOCATION)(irp + 1) + stack_size; } +void WINAPI IoReuseIrp(IRP *irp, NTSTATUS iostatus) +{ + UCHAR AllocationFlags; + + TRACE("irp %p, iostatus %#x.\n", irp, iostatus); + + AllocationFlags = irp->AllocationFlags; + IoInitializeIrp(irp, irp->Size, irp->StackCount); + irp->AllocationFlags = AllocationFlags; + irp->IoStatus.u.Status = iostatus; +} /*********************************************************************** * IoInitializeTimer (NTOSKRNL.EXE.@) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index c442656694..3b36a62269 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -462,7 +462,7 @@ @ stub IoReportTargetDeviceChange @ stub IoReportTargetDeviceChangeAsynchronous @ stub IoRequestDeviceEject -@ stub IoReuseIrp +@ stdcall IoReuseIrp(ptr long) @ stub IoSetCompletionRoutineEx @ stdcall IoSetDeviceInterfaceState(ptr long) @ stub IoSetDeviceToVerify diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index e762ad0ccd..f6cc442bab 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -211,9 +211,18 @@ static void *get_proc_address(const char *name) static FILE_OBJECT *last_created_file; static unsigned int create_count, close_count; +static NTSTATUS WINAPI test_irp_struct_completion_routine(DEVICE_OBJECT *reserved, IRP *irp, void *context) +{ + unsigned int *result = context; + + *result = 1; + return STATUS_MORE_PROCESSING_REQUIRED; +} + static void test_irp_struct(IRP *irp, DEVICE_OBJECT *device) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); + unsigned int irp_completion_result; ok(device == upper_device, "Expected device %p, got %p.\n", upper_device, device); ok(last_created_file != NULL, "last_created_file = NULL\n"); @@ -225,6 +234,34 @@ static void test_irp_struct(IRP *irp, DEVICE_OBJECT *device) "IRP thread is not the current thread\n"); ok(IoGetRequestorProcess(irp) == IoGetCurrentProcess(), "processes didn't match\n"); + + irp = IoAllocateIrp(1, FALSE); + ok(irp->AllocationFlags == IRP_ALLOCATED_FIXED_SIZE, "Got unexpected irp->AllocationFlags %#x.\n", + irp->AllocationFlags); + ok(irp->CurrentLocation == 2, + "Got unexpected irp->CurrentLocation %u.\n", irp->CurrentLocation); + IoSetCompletionRoutine(irp, test_irp_struct_completion_routine, &irp_completion_result, + TRUE, TRUE, TRUE); + + irp_completion_result = 0; + + irp->IoStatus.Status = STATUS_SUCCESS; + --irp->CurrentLocation; + --irp->Tail.Overlay.CurrentStackLocation; + IoCompleteRequest(irp, IO_NO_INCREMENT); + ok(irp->CurrentLocation == 2, + "Got unexpected irp->CurrentLocation %u.\n", irp->CurrentLocation); + ok(irp_completion_result, "IRP completion was not called.\n"); + + --irp->CurrentLocation; + --irp->Tail.Overlay.CurrentStackLocation; + IoReuseIrp(irp, STATUS_UNSUCCESSFUL); + ok(irp->CurrentLocation == 2, + "Got unexpected irp->CurrentLocation %u.\n", irp->CurrentLocation); + ok(irp->AllocationFlags == IRP_ALLOCATED_FIXED_SIZE, "Got unexpected irp->AllocationFlags %#x.\n", + irp->AllocationFlags); + + IoFreeIrp(irp); } static void test_mdl_map(void) diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 0d98680cfa..57e4cf4fe5 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1679,6 +1679,7 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(PDEVICE_OBJECT,const GUID*,PUNICODE_S void WINAPI IoReleaseCancelSpinLock(KIRQL); void WINAPI IoReleaseRemoveLockAndWaitEx(IO_REMOVE_LOCK*,void*,ULONG); void WINAPI IoReleaseRemoveLockEx(IO_REMOVE_LOCK*,void*,ULONG); +void WINAPI IoReuseIrp(IRP*,NTSTATUS); NTSTATUS WINAPI IoSetDeviceInterfaceState(UNICODE_STRING*,BOOLEAN); NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
1
0
0
0
Paul Gofman : ntoskrnl.exe: Add stub for ExUnregisterCallback() function.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: 9effc3f96333d809ffba43b975fa062cbf8912d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9effc3f96333d809ffba43b9…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:07 2020 +0300 ntoskrnl.exe: Add stub for ExUnregisterCallback() function. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 5 +++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/wdm.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index f0892141c2..3c8b207a4a 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2071,6 +2071,11 @@ void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT callback_object, return (void *)0xdeadbeef; } +void WINAPI ExUnregisterCallback(void *callback_registration) +{ + FIXME("callback_registration %p stub.\n", callback_registration); +} + /*********************************************************************** * ExFreePool (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index dcec2375df..c442656694 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -191,7 +191,7 @@ @ stdcall ExSetTimerResolution(long long) @ stub ExSystemExceptionFilter @ stdcall ExSystemTimeToLocalTime(ptr ptr) RtlSystemTimeToLocalTime -@ stub ExUnregisterCallback +@ stdcall ExUnregisterCallback(ptr) @ stdcall ExUuidCreate(ptr) @ stub ExVerifySuite @ stub ExWindowStationObjectType diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 282ea14b77..0d98680cfa 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1632,6 +1632,7 @@ void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT,PCALLBACK_FUNCTION,void*); void FASTCALL ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN); +void WINAPI ExUnregisterCallback(void*); void WINAPI IoAcquireCancelSpinLock(KIRQL*); NTSTATUS WINAPI IoAcquireRemoveLockEx(IO_REMOVE_LOCK*,void*,const char*,ULONG, ULONG);
1
0
0
0
Paul Gofman : ntoskrnl.exe: Add stub for ExRegisterCallback() function.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: 7bc99ae1254f467a23b46756dce40a15494f0758 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7bc99ae1254f467a23b46756…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:06 2020 +0300 ntoskrnl.exe: Add stub for ExRegisterCallback() function. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/wdm.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 09d4796ad4..f0892141c2 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2062,6 +2062,14 @@ NTSTATUS WINAPI ExCreateCallback(PCALLBACK_OBJECT *obj, POBJECT_ATTRIBUTES attr, return STATUS_SUCCESS; } +void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT callback_object, + PCALLBACK_FUNCTION callback_function, void *callback_context) +{ + FIXME("callback_object %p, callback_function %p, callback_context %p stub.\n", + callback_object, callback_function, callback_context); + + return (void *)0xdeadbeef; +} /*********************************************************************** * ExFreePool (NTOSKRNL.EXE.@) @@ -3046,6 +3054,7 @@ PVOID WINAPI MmGetSystemRoutineAddress(PUNICODE_STRING SystemRoutineName) if (!pFunc) { hMod = GetModuleHandleW( halW ); + if (hMod) pFunc = GetProcAddress( hMod, routineNameA.Buffer ); } RtlFreeAnsiString( &routineNameA ); diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index dd7ff73bee..dcec2375df 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -183,7 +183,7 @@ @ stub ExRaiseException @ stub ExRaiseHardError @ stub ExRaiseStatus -@ stub ExRegisterCallback +@ stdcall ExRegisterCallback(ptr ptr ptr) @ stub ExReinitializeResourceLite @ stdcall ExReleaseResourceForThreadLite(ptr long) @ extern ExSemaphoreObjectType diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index a67377352d..282ea14b77 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1356,6 +1356,7 @@ typedef void * (NTAPI *PALLOCATE_FUNCTION)(POOL_TYPE, SIZE_T, ULONG); typedef void * (NTAPI *PALLOCATE_FUNCTION_EX)(POOL_TYPE, SIZE_T, ULONG, PLOOKASIDE_LIST_EX); typedef void (NTAPI *PFREE_FUNCTION)(void *); typedef void (NTAPI *PFREE_FUNCTION_EX)(void *, PLOOKASIDE_LIST_EX); +typedef void (NTAPI *PCALLBACK_FUNCTION)(void *, void *, void *); #ifdef _WIN64 #define LOOKASIDE_ALIGN DECLSPEC_CACHEALIGN @@ -1627,6 +1628,7 @@ PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPI LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*); BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite(ERESOURCE*); ULONG WINAPI ExIsResourceAcquiredSharedLite(ERESOURCE*); +void * WINAPI ExRegisterCallback(PCALLBACK_OBJECT,PCALLBACK_FUNCTION,void*); void FASTCALL ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN);
1
0
0
0
Paul Gofman : ntoskrnl.exe: Return STATUS_SUCCESS from ExCreateCallback() stub.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: 1cad86fced2b8eb32dcc1e2d58858f45e8135ea3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1cad86fced2b8eb32dcc1e2d…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:05 2020 +0300 ntoskrnl.exe: Return STATUS_SUCCESS from ExCreateCallback() stub. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 3cb5591920..09d4796ad4 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2059,7 +2059,7 @@ NTSTATUS WINAPI ExCreateCallback(PCALLBACK_OBJECT *obj, POBJECT_ATTRIBUTES attr, { FIXME("(%p, %p, %u, %u): stub\n", obj, attr, create, allow_multiple); - return STATUS_NOT_IMPLEMENTED; + return STATUS_SUCCESS; }
1
0
0
0
Paul Gofman : ntoskrnl.exe: Fix ObRegisterCallbacks() function parameter definition.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: 4ae92fdaf653c8746284ecc8840a24e8ee5cb8ce URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ae92fdaf653c8746284ecc8…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri May 29 10:53:04 2020 +0300 ntoskrnl.exe: Fix ObRegisterCallbacks() function parameter definition. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 4 ++-- include/ddk/wdm.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index d50eac6c82..3cb5591920 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2807,9 +2807,9 @@ void FASTCALL ObfDereferenceObject( void *obj ) /*********************************************************************** * ObRegisterCallbacks (NTOSKRNL.EXE.@) */ -NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION *callBack, void **handle) +NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION callback, void **handle) { - FIXME( "stub: %p %p\n", callBack, handle ); + FIXME( "callback %p, handle %p.\n", callback, handle ); if(handle) *handle = UlongToHandle(0xdeadbeaf); diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 38a3098994..a67377352d 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1749,7 +1749,7 @@ static inline void *MmGetSystemAddressForMdlSafe(MDL *mdl, ULONG priority) void FASTCALL ObfReferenceObject(void*); void WINAPI ObDereferenceObject(void*); USHORT WINAPI ObGetFilterVersion(void); -NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION*, void**); +NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION, void**); NTSTATUS WINAPI ObReferenceObjectByHandle(HANDLE,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE,PVOID*,POBJECT_HANDLE_INFORMATION); NTSTATUS WINAPI ObReferenceObjectByName(UNICODE_STRING*,ULONG,ACCESS_STATE*,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE,void*,void**); NTSTATUS WINAPI ObReferenceObjectByPointer(void*,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE);
1
0
0
0
Ziqing Hui : windowscodecs: Implement DdsDecoder_Dds_GetFrame().
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: 870b08b7fd59bd37dc66f7322019618e0e494595 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=870b08b7fd59bd37dc66f732…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu May 28 13:08:55 2020 +0800 windowscodecs: Implement DdsDecoder_Dds_GetFrame(). DdsDecoder_GetFrame() is implemented on top of DdsDecoder_Dds_GetFrame(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Esme Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 80 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 8 deletions(-) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index 7341147245..333f015820 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -121,8 +121,12 @@ typedef struct DdsFrameDecode { IWICBitmapFrameDecode IWICBitmapFrameDecode_iface; IWICDdsFrameDecode IWICDdsFrameDecode_iface; LONG ref; + UINT width; + UINT height; } DdsFrameDecode; +static HRESULT WINAPI DdsDecoder_Dds_GetFrame(IWICDdsDecoder *, UINT, UINT, UINT, IWICBitmapFrameDecode **); + static inline BOOL has_extended_header(DDS_HEADER *header) { return (header->ddspf.flags & DDPF_FOURCC) && @@ -643,15 +647,35 @@ static HRESULT WINAPI DdsDecoder_GetFrameCount(IWICBitmapDecoder *iface, static HRESULT WINAPI DdsDecoder_GetFrame(IWICBitmapDecoder *iface, UINT index, IWICBitmapFrameDecode **ppIBitmapFrame) { - HRESULT hr; - DdsFrameDecode *frame_decode; + DdsDecoder *This = impl_from_IWICBitmapDecoder(iface); + UINT frame_per_texture, array_index, mip_level, slice_index, depth; - FIXME("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); + TRACE("(%p,%u,%p)\n", iface, index, ppIBitmapFrame); - hr = DdsFrameDecode_CreateInstance(&frame_decode); - if (hr == S_OK) *ppIBitmapFrame = &frame_decode->IWICBitmapFrameDecode_iface; + if (!ppIBitmapFrame) return E_INVALIDARG; - return hr; + EnterCriticalSection(&This->lock); + + if (!This->initialized) { + LeaveCriticalSection(&This->lock); + return WINCODEC_ERR_WRONGSTATE; + } + + frame_per_texture = This->info.frame_count / This->info.array_size; + array_index = index / frame_per_texture; + slice_index = index % frame_per_texture; + depth = This->info.depth; + mip_level = 0; + while (slice_index >= depth) + { + slice_index -= depth; + mip_level++; + if (depth > 1) depth /= 2; + } + + LeaveCriticalSection(&This->lock); + + return DdsDecoder_Dds_GetFrame(&This->IWICDdsDecoder_iface, array_index, mip_level, slice_index, ppIBitmapFrame); } static const IWICBitmapDecoderVtbl DdsDecoder_Vtbl = { @@ -730,9 +754,49 @@ static HRESULT WINAPI DdsDecoder_Dds_GetFrame(IWICDdsDecoder *iface, UINT arrayIndex, UINT mipLevel, UINT sliceIndex, IWICBitmapFrameDecode **bitmapFrame) { - TRACE("(%p,%u,%u,%u,%p): Stub.\n", iface, arrayIndex, mipLevel, sliceIndex, bitmapFrame); + DdsDecoder *This = impl_from_IWICDdsDecoder(iface); + HRESULT hr; + UINT width = 0, height = 0; + int j; + DdsFrameDecode *frame_decode; - return E_NOTIMPL; + TRACE("(%p,%u,%u,%u,%p)\n", iface, arrayIndex, mipLevel, sliceIndex, bitmapFrame); + + if (!bitmapFrame) return E_INVALIDARG; + + EnterCriticalSection(&This->lock); + + if (!This->initialized) { + hr = WINCODEC_ERR_WRONGSTATE; + goto end; + } + + if (arrayIndex >= This->info.array_size || mipLevel >= This->info.mip_levels || sliceIndex >= This->info.depth) { + hr = E_INVALIDARG; + goto end; + } + + width = This->info.width; + height = This->info.height; + for (j = 0; j < mipLevel; j++) + { + if (width > 1) width /= 2; + if (height > 1) height /= 2; + } + + hr = DdsFrameDecode_CreateInstance(&frame_decode); + if (hr != S_OK) goto end; + + frame_decode->width = width; + frame_decode->height = height; + *bitmapFrame = &frame_decode->IWICBitmapFrameDecode_iface; + + hr = S_OK; + +end: + LeaveCriticalSection(&This->lock); + + return hr; } static const IWICDdsDecoderVtbl DdsDecoder_Dds_Vtbl = {
1
0
0
0
Ziqing Hui : windowscodecs: Implement DdsFrameDecode_GetSize().
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: 9a6108cf438808e93b1e5a66a56a2c72444fa6c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9a6108cf438808e93b1e5a66…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu May 28 13:09:09 2020 +0800 windowscodecs: Implement DdsFrameDecode_GetSize(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Esme Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 9 +++++++-- dlls/windowscodecs/tests/ddsformat.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index 333f015820..20017788a0 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -299,9 +299,14 @@ static ULONG WINAPI DdsFrameDecode_Release(IWICBitmapFrameDecode *iface) static HRESULT WINAPI DdsFrameDecode_GetSize(IWICBitmapFrameDecode *iface, UINT *puiWidth, UINT *puiHeight) { - FIXME("(%p,%p,%p): stub.\n", iface, puiWidth, puiHeight); + DdsFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface); - return E_NOTIMPL; + *puiWidth = This->width; + *puiHeight = This->height; + + TRACE("(%p) -> (%d,%d)\n", iface, *puiWidth, *puiHeight); + + return S_OK; } static HRESULT WINAPI DdsFrameDecode_GetPixelFormat(IWICBitmapFrameDecode *iface, diff --git a/dlls/windowscodecs/tests/ddsformat.c b/dlls/windowscodecs/tests/ddsformat.c index e31ca576fc..c7f56307d7 100644 --- a/dlls/windowscodecs/tests/ddsformat.c +++ b/dlls/windowscodecs/tests/ddsformat.c @@ -383,7 +383,7 @@ static void test_dds_decoder_frame_size(IWICBitmapDecoder *decoder, IWICBitmapFr if (hr != S_OK) goto end; hr = IWICBitmapFrameDecode_GetSize(frame_decode, &width, &height); - todo_wine ok (hr == S_OK, "%d: GetSize failed for frame %d, hr=%x\n", i, frame_index, hr); + ok (hr == S_OK, "%d: GetSize failed for frame %d, hr=%x\n", i, frame_index, hr); if (hr != S_OK) goto end; depth = params.Depth;
1
0
0
0
Ziqing Hui : windowscodecs: Get DDS parameters when initialize.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: ab0d2b1434d8f81e1f291cc10115e5cef7f1d3b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab0d2b1434d8f81e1f291cc1…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Thu May 28 13:08:39 2020 +0800 windowscodecs: Get DDS parameters when initialize. Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Esme Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/ddsformat.c | 100 ++++++++++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 36 deletions(-) diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index de4cd1ea01..7341147245 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -93,6 +93,18 @@ typedef struct { DWORD miscFlags2; } DDS_HEADER_DXT10; +typedef struct dds_info { + UINT width; + UINT height; + UINT depth; + UINT mip_levels; + UINT array_size; + UINT frame_count; + DXGI_FORMAT format; + WICDdsDimension dimension; + WICDdsAlphaMode alpha_mode; +} dds_info; + typedef struct DdsDecoder { IWICBitmapDecoder IWICBitmapDecoder_iface; IWICDdsDecoder IWICDdsDecoder_iface; @@ -102,6 +114,7 @@ typedef struct DdsDecoder { CRITICAL_SECTION lock; DDS_HEADER header; DDS_HEADER_DXT10 header_dxt10; + dds_info info; } DdsDecoder; typedef struct DdsFrameDecode { @@ -175,6 +188,45 @@ static WICDdsAlphaMode get_alpha_mode_from_fourcc(DWORD fourcc) } } +static void get_dds_info(dds_info* info, DDS_HEADER *header, DDS_HEADER_DXT10 *header_dxt10) +{ + int i; + UINT depth; + + info->width = header->width; + info->height = header->height; + info->depth = 1; + info->mip_levels = 1; + info->array_size = 1; + if (header->depth) info->depth = header->depth; + if (header->mipMapCount) info->mip_levels = header->mipMapCount; + + if (has_extended_header(header)) { + if (header_dxt10->arraySize) info->array_size = header_dxt10->arraySize; + info->format = header_dxt10->dxgiFormat; + info->dimension = get_dimension(NULL, header_dxt10); + info->alpha_mode = header_dxt10->miscFlags2 & 0x00000008; + } else { + info->format = get_format_from_fourcc(header->ddspf.fourCC); + info->dimension = get_dimension(header, NULL); + info->alpha_mode = get_alpha_mode_from_fourcc(header->ddspf.fourCC); + } + + /* get frame count */ + if (info->depth == 1) { + info->frame_count = info->array_size * info->mip_levels; + } else { + info->frame_count = 0; + depth = info->depth; + for (i = 0; i < info->mip_levels; i++) + { + info->frame_count += depth; + if (depth > 1) depth /= 2; + } + info->frame_count *= info->array_size; + } +} + static inline DdsDecoder *impl_from_IWICBitmapDecoder(IWICBitmapDecoder *iface) { return CONTAINING_RECORD(iface, DdsDecoder, IWICBitmapDecoder_iface); @@ -497,6 +549,8 @@ static HRESULT WINAPI DdsDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p } } + get_dds_info(&This->info, &This->header, &This->header_dxt10); + This->initialized = TRUE; This->stream = pIStream; IStream_AddRef(pIStream); @@ -571,33 +625,17 @@ static HRESULT WINAPI DdsDecoder_GetFrameCount(IWICBitmapDecoder *iface, UINT *pCount) { DdsDecoder *This = impl_from_IWICBitmapDecoder(iface); - UINT arraySize = 1, mipMapCount = 1, depth = 1; - int i; if (!pCount) return E_INVALIDARG; if (!This->initialized) return WINCODEC_ERR_WRONGSTATE; EnterCriticalSection(&This->lock); - if (This->header.mipMapCount) mipMapCount = This->header.mipMapCount; - if (This->header.depth) depth = This->header.depth; - if (has_extended_header(&This->header) && This->header_dxt10.arraySize) arraySize = This->header_dxt10.arraySize; - - if (depth == 1) { - *pCount = arraySize * mipMapCount; - } else { - *pCount = 0; - for (i = 0; i < mipMapCount; i++) - { - *pCount += depth; - if (depth > 1) depth /= 2; - } - *pCount *= arraySize; - } + *pCount = This->info.frame_count; LeaveCriticalSection(&This->lock); - TRACE("(%p) <-- %d\n", iface, *pCount); + TRACE("(%p) -> %d\n", iface, *pCount); return S_OK; } @@ -667,24 +705,14 @@ static HRESULT WINAPI DdsDecoder_Dds_GetParameters(IWICDdsDecoder *iface, goto end; } - parameters->Width = This->header.width; - parameters->Height = This->header.height; - parameters->Depth = 1; - parameters->MipLevels = 1; - parameters->ArraySize = 1; - if (This->header.depth) parameters->Depth = This->header.depth; - if (This->header.mipMapCount) parameters->MipLevels = This->header.mipMapCount; - - if (has_extended_header(&This->header)) { - if (This->header_dxt10.arraySize) parameters->ArraySize = This->header_dxt10.arraySize; - parameters->DxgiFormat = This->header_dxt10.dxgiFormat; - parameters->Dimension = get_dimension(NULL, &This->header_dxt10); - parameters->AlphaMode = This->header_dxt10.miscFlags2 & 0x00000008; - } else { - parameters->DxgiFormat = get_format_from_fourcc(This->header.ddspf.fourCC); - parameters->Dimension = get_dimension(&This->header, NULL); - parameters->AlphaMode = get_alpha_mode_from_fourcc(This->header.ddspf.fourCC); - } + parameters->Width = This->info.width; + parameters->Height = This->info.height; + parameters->Depth = This->info.depth; + parameters->MipLevels = This->info.mip_levels; + parameters->ArraySize = This->info.array_size; + parameters->DxgiFormat = This->info.format; + parameters->Dimension = This->info.dimension; + parameters->AlphaMode = This->info.alpha_mode; TRACE("(%p) -> (%dx%d depth=%d mipLevels=%d arraySize=%d dxgiFormat=0x%x dimension=0x%x alphaMode=0x%x)\n", iface, parameters->Width, parameters->Height, parameters->Depth, parameters->MipLevels,
1
0
0
0
Serge Gautherie : mscoree: RegQueryValueExW() wants bytes, not chars.
by Alexandre Julliard
29 May '20
29 May '20
Module: wine Branch: master Commit: e4e5eda3d9afcb5360747ddd97e6bf4fdc0c1c0f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e4e5eda3d9afcb5360747ddd…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Thu May 28 04:30:37 2020 +0200 mscoree: RegQueryValueExW() wants bytes, not chars. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Esme Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscoree/metahost.c | 2 +- dlls/mscoree/mscoree_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 9a299662e3..7702994252 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -477,7 +477,7 @@ static BOOL get_install_root(LPWSTR install_dir) if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key)) return FALSE; - len = MAX_PATH; + len = MAX_PATH * sizeof(WCHAR); if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len)) { RegCloseKey(key); diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index 81fe5610b7..4679d79e66 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -80,7 +80,7 @@ static BOOL get_install_root(LPWSTR install_dir) if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key)) return FALSE; - len = MAX_PATH; + len = MAX_PATH * sizeof(WCHAR); if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len)) { RegCloseKey(key);
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
75
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200