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
July
June
May
April
March
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
March 2015
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
2 participants
775 discussions
Start a n
N
ew thread
Alexandre Julliard : ntoskrnl: Use the MDL allocation routines for standard ioctl processing.
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: 1895a42509e8ea96946c10bbe4fc0d03ca8a044d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1895a42509e8ea96946c10bbe…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 4 22:45:06 2015 +0900 ntoskrnl: Use the MDL allocation routines for standard ioctl processing. --- dlls/ntoskrnl.exe/ntoskrnl.c | 56 +++++++++++++++++++++++++++----------------- include/ddk/wdm.h | 2 ++ 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 9734296..a282b37 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -140,7 +140,6 @@ static HANDLE get_device_manager(void) static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, ULONG in_size, void *out_buff, ULONG *out_size ) { - MDL mdl; IRP *irp; void *sys_buff = NULL; FILE_OBJECT file; @@ -150,7 +149,6 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, TRACE( "ioctl %x device %p in_size %u out_size %u\n", code, device, in_size, *out_size ); /* so we can spot things that we should initialize */ - memset( &mdl, 0x77, sizeof(mdl) ); memset( &file, 0x88, sizeof(file) ); if ((code & 3) == METHOD_BUFFERED) @@ -170,18 +168,13 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, irp->RequestorMode = UserMode; irp->AssociatedIrp.SystemBuffer = ((code & 3) == METHOD_BUFFERED) ? sys_buff : in_buff; irp->UserBuffer = out_buff; - irp->MdlAddress = &mdl; irp->Tail.Overlay.OriginalFileObject = &file; - mdl.Next = NULL; - mdl.Size = 0; - mdl.StartVa = out_buff; - mdl.ByteCount = *out_size; - mdl.ByteOffset = 0; - file.FsContext = NULL; file.FsContext2 = NULL; + IoAllocateMdl( out_buff, *out_size, FALSE, FALSE, irp ); + device->CurrentIrp = irp; KeQueryTickCount( &count ); /* update the global KeTickCount */ @@ -385,8 +378,18 @@ PIRP WINAPI IoAllocateIrp( CCHAR stack_size, BOOLEAN charge_quota ) */ void WINAPI IoFreeIrp( IRP *irp ) { + MDL *mdl; + TRACE( "%p\n", irp ); + mdl = irp->MdlAddress; + while (mdl) + { + MDL *next = mdl->Next; + IoFreeMdl( mdl ); + mdl = next; + } + ExFreePool( irp ); } @@ -404,24 +407,21 @@ PVOID WINAPI IoAllocateErrorLogEntry( PVOID IoObject, UCHAR EntrySize ) /*********************************************************************** * IoAllocateMdl (NTOSKRNL.EXE.@) */ -PMDL WINAPI IoAllocateMdl( PVOID VirtualAddress, ULONG Length, BOOLEAN SecondaryBuffer, BOOLEAN ChargeQuota, PIRP Irp ) +PMDL WINAPI IoAllocateMdl( PVOID va, ULONG length, BOOLEAN secondary, BOOLEAN charge_quota, IRP *irp ) { PMDL mdl; - ULONG_PTR address = (ULONG_PTR)VirtualAddress; + ULONG_PTR address = (ULONG_PTR)va; ULONG_PTR page_address; SIZE_T nb_pages, mdl_size; - TRACE("(%p, %u, %i, %i, %p)\n", VirtualAddress, Length, SecondaryBuffer, ChargeQuota, Irp); + TRACE("(%p, %u, %i, %i, %p)\n", va, length, secondary, charge_quota, irp); - if (Irp) - FIXME("Attaching the MDL to an IRP is not yet supported\n"); - - if (ChargeQuota) + if (charge_quota) FIXME("Charge quota is not yet supported\n"); /* FIXME: We suppose that page size is 4096 */ page_address = address & ~(4096 - 1); - nb_pages = (((address + Length - 1) & ~(4096 - 1)) - page_address) / 4096 + 1; + nb_pages = (((address + length - 1) & ~(4096 - 1)) - page_address) / 4096 + 1; mdl_size = sizeof(MDL) + nb_pages * sizeof(PVOID); @@ -430,11 +430,24 @@ PMDL WINAPI IoAllocateMdl( PVOID VirtualAddress, ULONG Length, BOOLEAN Secondary return NULL; mdl->Size = mdl_size; - mdl->Process = IoGetCurrentProcess(); + mdl->Process = NULL; /* FIXME: IoGetCurrentProcess */ mdl->StartVa = (PVOID)page_address; - mdl->ByteCount = Length; + mdl->ByteCount = length; mdl->ByteOffset = address - page_address; + if (!irp) return mdl; + + if (secondary) /* add it at the end */ + { + MDL **pmdl = &irp->MdlAddress; + while (*pmdl) pmdl = &(*pmdl)->Next; + *pmdl = mdl; + } + else + { + mdl->Next = irp->MdlAddress; + irp->MdlAddress = mdl; + } return mdl; } @@ -442,10 +455,9 @@ PMDL WINAPI IoAllocateMdl( PVOID VirtualAddress, ULONG Length, BOOLEAN Secondary /*********************************************************************** * IoFreeMdl (NTOSKRNL.EXE.@) */ -VOID WINAPI IoFreeMdl(PMDL mdl) +void WINAPI IoFreeMdl(PMDL mdl) { - FIXME("partial stub: %p\n", mdl); - + TRACE("%p\n", mdl); HeapFree(GetProcessHeap(), 0, mdl); } diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index 661b75e..c234375 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1199,6 +1199,7 @@ void WINAPI ExFreePoolWithTag(PVOID,ULONG); NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*); PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR); PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN); +PMDL WINAPI IoAllocateMdl(PVOID,ULONG,BOOLEAN,BOOLEAN,IRP*); PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*); NTSTATUS WINAPI IoCallDriver(DEVICE_OBJECT*,IRP*); VOID WINAPI IoCompleteRequest(IRP*,UCHAR); @@ -1209,6 +1210,7 @@ void WINAPI IoDeleteDevice(DEVICE_OBJECT*); void WINAPI IoDeleteDriver(DRIVER_OBJECT*); NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*); void WINAPI IoFreeIrp(IRP*); +void WINAPI IoFreeMdl(MDL*); PEPROCESS WINAPI IoGetCurrentProcess(void); NTSTATUS WINAPI IoGetDeviceInterfaces(const GUID*,PDEVICE_OBJECT,ULONG,PWSTR*); NTSTATUS WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*);
1
0
0
0
Alexandre Julliard : ntoskrnl: Use the IRP allocation routines for standard ioctl processing.
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: 5fc369ff21ba4c66242ed7c26cf888bfc159fe9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5fc369ff21ba4c66242ed7c26…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 4 22:21:45 2015 +0900 ntoskrnl: Use the IRP allocation routines for standard ioctl processing. --- dlls/ntoskrnl.exe/ntoskrnl.c | 116 +++++++++++++++++++------------------------ include/ddk/wdm.h | 1 + 2 files changed, 53 insertions(+), 64 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index cdc5305..9734296 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -140,45 +140,38 @@ static HANDLE get_device_manager(void) static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, ULONG in_size, void *out_buff, ULONG *out_size ) { - IRP irp; MDL mdl; - IO_STACK_LOCATION irpsp; + IRP *irp; + void *sys_buff = NULL; FILE_OBJECT file; - PDRIVER_DISPATCH dispatch = device->DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]; - NTSTATUS status; + IO_STATUS_BLOCK iosb; LARGE_INTEGER count; TRACE( "ioctl %x device %p in_size %u out_size %u\n", code, device, in_size, *out_size ); /* so we can spot things that we should initialize */ - memset( &irp, 0x55, sizeof(irp) ); - memset( &irpsp, 0x66, sizeof(irpsp) ); memset( &mdl, 0x77, sizeof(mdl) ); memset( &file, 0x88, sizeof(file) ); - irp.RequestorMode = UserMode; if ((code & 3) == METHOD_BUFFERED) { - irp.AssociatedIrp.SystemBuffer = HeapAlloc( GetProcessHeap(), 0, max( in_size, *out_size ) ); - if (!irp.AssociatedIrp.SystemBuffer) + if (!(sys_buff = HeapAlloc( GetProcessHeap(), 0, max( in_size, *out_size ) ))) return STATUS_NO_MEMORY; - memcpy( irp.AssociatedIrp.SystemBuffer, in_buff, in_size ); + memcpy( sys_buff, in_buff, in_size ); } - else - irp.AssociatedIrp.SystemBuffer = in_buff; - irp.UserBuffer = out_buff; - irp.MdlAddress = &mdl; - irp.Tail.Overlay.s.u2.CurrentStackLocation = &irpsp; - irp.Tail.Overlay.OriginalFileObject = &file; - irp.UserIosb = NULL; - - irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL; - irpsp.Parameters.DeviceIoControl.OutputBufferLength = *out_size; - irpsp.Parameters.DeviceIoControl.InputBufferLength = in_size; - irpsp.Parameters.DeviceIoControl.IoControlCode = code; - irpsp.Parameters.DeviceIoControl.Type3InputBuffer = in_buff; - irpsp.DeviceObject = device; - irpsp.CompletionRoutine = NULL; + + irp = IoBuildDeviceIoControlRequest( code, device, in_buff, in_size, out_buff, *out_size, + FALSE, NULL, &iosb ); + if (!irp) + { + HeapFree( GetProcessHeap(), 0, sys_buff ); + return STATUS_NO_MEMORY; + } + irp->RequestorMode = UserMode; + irp->AssociatedIrp.SystemBuffer = ((code & 3) == METHOD_BUFFERED) ? sys_buff : in_buff; + irp->UserBuffer = out_buff; + irp->MdlAddress = &mdl; + irp->Tail.Overlay.OriginalFileObject = &file; mdl.Next = NULL; mdl.Size = 0; @@ -189,27 +182,17 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff, file.FsContext = NULL; file.FsContext2 = NULL; - device->CurrentIrp = &irp; + device->CurrentIrp = irp; KeQueryTickCount( &count ); /* update the global KeTickCount */ - if (TRACE_ON(relay)) - DPRINTF( "%04x:Call driver dispatch %p (device=%p,irp=%p)\n", - GetCurrentThreadId(), dispatch, device, &irp ); + IoCallDriver( device, irp ); - status = dispatch( device, &irp ); + *out_size = (iosb.u.Status >= 0) ? iosb.Information : 0; + if (out_buff && (code & 3) == METHOD_BUFFERED) memcpy( out_buff, sys_buff, *out_size ); - if (TRACE_ON(relay)) - DPRINTF( "%04x:Ret driver dispatch %p (device=%p,irp=%p) retval=%08x\n", - GetCurrentThreadId(), dispatch, device, &irp, status ); - - *out_size = (irp.IoStatus.u.Status >= 0) ? irp.IoStatus.Information : 0; - if ((code & 3) == METHOD_BUFFERED) - { - if (out_buff) memcpy( out_buff, irp.AssociatedIrp.SystemBuffer, *out_size ); - HeapFree( GetProcessHeap(), 0, irp.AssociatedIrp.SystemBuffer ); - } - return irp.IoStatus.u.Status; + HeapFree( GetProcessHeap(), 0, sys_buff ); + return iosb.u.Status; } @@ -493,29 +476,23 @@ PDEVICE_OBJECT WINAPI IoAttachDeviceToDeviceStack( DEVICE_OBJECT *source, /*********************************************************************** * IoBuildDeviceIoControlRequest (NTOSKRNL.EXE.@) */ -PIRP WINAPI IoBuildDeviceIoControlRequest( ULONG IoControlCode, - PDEVICE_OBJECT DeviceObject, - PVOID InputBuffer, - ULONG InputBufferLength, - PVOID OutputBuffer, - ULONG OutputBufferLength, - BOOLEAN InternalDeviceIoControl, - PKEVENT Event, - PIO_STATUS_BLOCK IoStatusBlock ) +PIRP WINAPI IoBuildDeviceIoControlRequest( ULONG code, PDEVICE_OBJECT device, + PVOID in_buff, ULONG in_len, + PVOID out_buff, ULONG out_len, + BOOLEAN internal, PKEVENT event, + PIO_STATUS_BLOCK iosb ) { PIRP irp; PIO_STACK_LOCATION irpsp; struct IrpInstance *instance; TRACE( "%x, %p, %p, %u, %p, %u, %u, %p, %p\n", - IoControlCode, DeviceObject, InputBuffer, InputBufferLength, - OutputBuffer, OutputBufferLength, InternalDeviceIoControl, - Event, IoStatusBlock ); + code, device, in_buff, in_len, out_buff, out_len, internal, event, iosb ); - if (DeviceObject == NULL) + if (device == NULL) return NULL; - irp = IoAllocateIrp( DeviceObject->StackSize, FALSE ); + irp = IoAllocateIrp( device->StackSize, FALSE ); if (irp == NULL) return NULL; @@ -529,12 +506,16 @@ PIRP WINAPI IoBuildDeviceIoControlRequest( ULONG IoControlCode, list_add_tail( &Irps, &instance->entry ); irpsp = IoGetNextIrpStackLocation( irp ); - irpsp->MajorFunction = InternalDeviceIoControl ? - IRP_MJ_INTERNAL_DEVICE_CONTROL : IRP_MJ_DEVICE_CONTROL; - irpsp->Parameters.DeviceIoControl.IoControlCode = IoControlCode; - irp->UserIosb = IoStatusBlock; - irp->UserEvent = Event; + irpsp->MajorFunction = internal ? IRP_MJ_INTERNAL_DEVICE_CONTROL : IRP_MJ_DEVICE_CONTROL; + irpsp->Parameters.DeviceIoControl.IoControlCode = code; + irpsp->Parameters.DeviceIoControl.InputBufferLength = in_len; + irpsp->Parameters.DeviceIoControl.OutputBufferLength = out_len; + irpsp->Parameters.DeviceIoControl.Type3InputBuffer = in_buff; + irpsp->DeviceObject = device; + irpsp->CompletionRoutine = NULL; + irp->UserIosb = iosb; + irp->UserEvent = event; return irp; } @@ -812,13 +793,20 @@ NTSTATUS WINAPI IoCallDriver( DEVICE_OBJECT *device, IRP *irp ) IO_STACK_LOCATION *irpsp; NTSTATUS status; - TRACE( "%p %p\n", device, irp ); - --irp->CurrentLocation; irpsp = --irp->Tail.Overlay.s.u2.CurrentStackLocation; dispatch = device->DriverObject->MajorFunction[irpsp->MajorFunction]; + + if (TRACE_ON(relay)) + DPRINTF( "%04x:Call driver dispatch %p (device=%p,irp=%p)\n", + GetCurrentThreadId(), dispatch, device, irp ); + status = dispatch( device, irp ); + if (TRACE_ON(relay)) + DPRINTF( "%04x:Ret driver dispatch %p (device=%p,irp=%p) retval=%08x\n", + GetCurrentThreadId(), dispatch, device, irp, status ); + return status; } @@ -1020,10 +1008,10 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost ) return; } } - if (iosb && STATUS_SUCCESS == status) + if (iosb) { iosb->u.Status = irp->IoStatus.u.Status; - iosb->Information = irp->IoStatus.Information; + if (iosb->u.Status >= 0) iosb->Information = irp->IoStatus.Information; } LIST_FOR_EACH_ENTRY( instance, &Irps, struct IrpInstance, entry ) { diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index e4f693a..661b75e 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1199,6 +1199,7 @@ void WINAPI ExFreePoolWithTag(PVOID,ULONG); NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*); PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR); PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN); +PIRP WINAPI IoBuildDeviceIoControlRequest(ULONG,DEVICE_OBJECT*,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,IO_STATUS_BLOCK*); NTSTATUS WINAPI IoCallDriver(DEVICE_OBJECT*,IRP*); VOID WINAPI IoCompleteRequest(IRP*,UCHAR); NTSTATUS WINAPI IoCreateDevice(DRIVER_OBJECT*,ULONG,UNICODE_STRING*,DEVICE_TYPE,ULONG,BOOLEAN,DEVICE_OBJECT**);
1
0
0
0
Alexandre Julliard : mountmgr: Don' t access the IRP after it has been completed.
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: 41eb2fd714c18422381f46e8b4f3608c06bef627 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41eb2fd714c18422381f46e8b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 4 22:18:04 2015 +0900 mountmgr: Don't access the IRP after it has been completed. --- dlls/mountmgr.sys/device.c | 2 +- dlls/mountmgr.sys/mountmgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 028c17f..7ee4078 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -967,7 +967,7 @@ static NTSTATUS WINAPI harddisk_ioctl( DEVICE_OBJECT *device, IRP *irp ) LeaveCriticalSection( &device_section ); IoCompleteRequest( irp, IO_NO_INCREMENT ); - return irp->IoStatus.u.Status; + return STATUS_SUCCESS; } /* driver entry point for the harddisk driver */ diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index 927e6e8..d7bc8d7 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -410,7 +410,7 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp ) break; } IoCompleteRequest( irp, IO_NO_INCREMENT ); - return irp->IoStatus.u.Status; + return STATUS_SUCCESS; } /* main entry point for the mount point manager driver */
1
0
0
0
Piotr Caban : ieframe/tests: Added more OleObject_Close tests.
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: da7c766bb5a4fb135cb9610cbf3a74675e315aaf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da7c766bb5a4fb135cb9610cb…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Mar 4 12:29:58 2015 +0100 ieframe/tests: Added more OleObject_Close tests. --- dlls/ieframe/tests/webbrowser.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c index 7f45182..d86faf8 100644 --- a/dlls/ieframe/tests/webbrowser.c +++ b/dlls/ieframe/tests/webbrowser.c @@ -3531,6 +3531,24 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download) ok(hres == S_OK, "hres = %x\n", hres); ok(!ocs, "ocs != NULL\n"); + SET_EXPECT(GetContainer); + SET_EXPECT(Site_GetWindow); + SET_EXPECT(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + SET_EXPECT(Invoke_AMBIENT_SILENT); + hres = IOleObject_DoVerb(oo, OLEIVERB_HIDE, NULL, (IOleClientSite*)0xdeadbeef, + 0, (HWND)0xdeadbeef, NULL); + ok(hres == S_OK, "DoVerb failed: %08x\n", hres); + todo_wine CHECK_CALLED(GetContainer); + todo_wine CHECK_CALLED(Site_GetWindow); + todo_wine CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); + todo_wine CHECK_CALLED(Invoke_AMBIENT_SILENT); + + hres = IOleObject_GetClientSite(oo, &ocs); + ok(hres == S_OK, "hres = %x\n", hres); + todo_wine ok(ocs == &ClientSite, "ocs != &ClientSite\n"); + if(ocs) + IOleClientSite_Release(ocs); + hres = IOleObject_Close(oo, OLECLOSE_NOSAVE); ok(hres == S_OK, "OleObject_Close failed: %x\n", hres);
1
0
0
0
Michael Stefaniuc : ws2_32/tests: Actually test a return value (PVS-Studio ).
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: bbe2c58261a1dd9b4a4fd0c6c353355742f59ab0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bbe2c58261a1dd9b4a4fd0c6c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 4 10:14:40 2015 +0100 ws2_32/tests: Actually test a return value (PVS-Studio). --- dlls/ws2_32/tests/sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 6569515..7155a09 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4374,6 +4374,7 @@ static void test_ioctlsocket(void) ok(ret != SOCKET_ERROR, "setsockopt failed unexpectedly\n"); arg = 0; ret = ioctlsocket(sock, SIOCATMARK, &arg); + ok(ret != SOCKET_ERROR, "ioctlsocket failed unexpectedly\n"); ok(arg, "SIOCATMARK expected a non-zero value\n"); ret = WSAIoctl(sock, SIO_KEEPALIVE_VALS, &arg, 0, NULL, 0, &arg, NULL, NULL);
1
0
0
0
Michael Stefaniuc : ws2_32/tests: Remove an unused assignment (PVS-Studio) .
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: 4c36ef1d4e2949264b212f3c54ad484d41063b2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c36ef1d4e2949264b212f3c5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 4 10:11:41 2015 +0100 ws2_32/tests: Remove an unused assignment (PVS-Studio). --- dlls/ws2_32/tests/sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 19663c2..6569515 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -3702,7 +3702,7 @@ static void test_accept(void) closesocket(accepted); closesocket(connector); - accepted = connector = server_socket = INVALID_SOCKET; + accepted = connector = INVALID_SOCKET; socklen = sizeof(address); server_socket = setup_server_socket(&address, &socklen);
1
0
0
0
Michael Stefaniuc : winmm/tests: mmioAdvance() returns a MMRESULT and not a size (PVS-Studio).
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: d1162078eaf662a8d6d93807d1983872e69c3ae9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1162078eaf662a8d6d93807d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 4 09:57:48 2015 +0100 winmm/tests: mmioAdvance() returns a MMRESULT and not a size (PVS-Studio). --- dlls/winmm/tests/mmio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winmm/tests/mmio.c b/dlls/winmm/tests/mmio.c index 89146ef..fd5433c 100644 --- a/dlls/winmm/tests/mmio.c +++ b/dlls/winmm/tests/mmio.c @@ -870,7 +870,8 @@ static void test_mmio_buffer_pointer(void) ok(mmio.pchEndRead == mmio.pchBuffer, "expected %p, got %p\n", mmio.pchBuffer, mmio.pchEndRead); /* fill the buffer */ - size = mmioAdvance(hmmio, &mmio, MMIO_READ); + res = mmioAdvance(hmmio, &mmio, MMIO_READ); + ok(res == MMSYSERR_NOERROR, "mmioAdvance failed %x\n", res); ok(mmio.pchEndRead-mmio.pchBuffer == sizeof(buffer), "got %d\n", (int)(mmio.pchEndRead-mmio.pchBuffer)); /* seeking to the same buffer chunk, the buffer is kept */
1
0
0
0
Michael Stefaniuc : windowscodecs/tests: Actually test some return values (PVS-Studio).
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: c2eb206f99443ecfb29f347e5c753d97944b5b14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c2eb206f99443ecfb29f347e5…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 4 09:54:53 2015 +0100 windowscodecs/tests: Actually test some return values (PVS-Studio). --- dlls/windowscodecs/tests/info.c | 1 + dlls/windowscodecs/tests/metadata.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/dlls/windowscodecs/tests/info.c b/dlls/windowscodecs/tests/info.c index 51181ca..8a22970 100644 --- a/dlls/windowscodecs/tests/info.c +++ b/dlls/windowscodecs/tests/info.c @@ -80,6 +80,7 @@ static void test_decoder_info(void) int i; hr = get_component_info(&CLSID_WICBmpDecoder, &info); + ok(hr == S_OK, "CreateComponentInfo failed, hr=%x\n", hr); hr = IWICComponentInfo_QueryInterface(info, &IID_IWICBitmapDecoderInfo, (void**)&decoder_info); ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); diff --git a/dlls/windowscodecs/tests/metadata.c b/dlls/windowscodecs/tests/metadata.c index fa9d701..20fe54c 100644 --- a/dlls/windowscodecs/tests/metadata.c +++ b/dlls/windowscodecs/tests/metadata.c @@ -965,6 +965,7 @@ static void test_metadata_png(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &containerformat); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&containerformat, &GUID_MetadataFormatChunktIME) || broken(IsEqualGUID(&containerformat, &GUID_MetadataFormatUnknown)) /* Windows XP */, "unexpected container format\n"); @@ -1109,6 +1110,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1157,6 +1159,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1210,6 +1213,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatLSD), /* Logical Screen Descriptor */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1228,6 +1232,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatAPE), /* Application Extension */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1246,6 +1251,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1264,6 +1270,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1312,6 +1319,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatIMD), /* Image Descriptor */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1330,6 +1338,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatGifComment), /* Comment Extension */ "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1349,6 +1358,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatUnknown), "wrong metadata format %s\n", wine_dbgstr_guid(&format)); @@ -1367,6 +1377,7 @@ static void test_metadata_gif(void) if (SUCCEEDED(hr)) { hr = IWICMetadataReader_GetMetadataFormat(reader, &format); + ok(hr == S_OK, "GetMetadataFormat failed, hr=%#x\n", hr); ok(IsEqualGUID(&format, &GUID_MetadataFormatGCE), /* Graphic Control Extension */ "wrong metadata format %s\n", wine_dbgstr_guid(&format));
1
0
0
0
Michael Stefaniuc : shlwapi: Remove two unused assignments (PVS-Studio).
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: a0e28403d447c2a78ce70ccbb915efe2e863b840 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0e28403d447c2a78ce70ccbb…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 4 09:52:59 2015 +0100 shlwapi: Remove two unused assignments (PVS-Studio). --- dlls/shlwapi/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index ba2f241..1a53252 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -688,11 +688,11 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, /* Canonicalize the base input prior to looking for the scheme */ myflags = dwFlags & (URL_DONT_SIMPLIFY | URL_UNESCAPE); len = INTERNET_MAX_URL_LENGTH; - ret = UrlCanonicalizeW(pszBase, mbase, &len, myflags); + UrlCanonicalizeW(pszBase, mbase, &len, myflags); /* Canonicalize the relative input prior to looking for the scheme */ len = INTERNET_MAX_URL_LENGTH; - ret = UrlCanonicalizeW(pszRelative, mrelative, &len, myflags); + UrlCanonicalizeW(pszRelative, mrelative, &len, myflags); /* See if the base has a scheme */ res1 = ParseURLW(mbase, &base);
1
0
0
0
Michael Stefaniuc : shell32/tests: Actually test some return values ( PVS-Studio).
by Alexandre Julliard
04 Mar '15
04 Mar '15
Module: wine Branch: master Commit: 725662003abac4b67e43a80b211c541e1e310d95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=725662003abac4b67e43a80b2…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Mar 4 09:50:59 2015 +0100 shell32/tests: Actually test some return values (PVS-Studio). --- dlls/shell32/tests/shellpath.c | 1 + dlls/shell32/tests/systray.c | 1 + 2 files changed, 2 insertions(+) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index e2277ec..af88c6b 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -2107,6 +2107,7 @@ static void test_knownFolders(void) ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n"); hr = IKnownFolder_GetPath(folder, 0, &folderPath); + ok(hr == S_OK, "failed to get path from known folder: 0x%08x\n", hr); ok(lstrcmpiW(sWinDir, folderPath)==0, "invalid path returned: \"%s\", expected: \"%s\"\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sWinDir)); CoTaskMemFree(folderPath); diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c index cb27866..0d815a6 100644 --- a/dlls/shell32/tests/systray.c +++ b/dlls/shell32/tests/systray.c @@ -45,6 +45,7 @@ static void test_cbsize(void) nidW.hIcon = LoadIconA(NULL, (LPSTR)IDI_APPLICATION); nidW.uCallbackMessage = WM_USER+17; ret = pShell_NotifyIconW(NIM_ADD, &nidW); + ok(ret, "NIM_ADD failed!\n"); /* using an invalid cbSize does work */ nidW.cbSize = 3; nidW.hWnd = hMainWnd;
1
0
0
0
← Newer
1
...
64
65
66
67
68
69
70
...
78
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
76
77
78
Results per page:
10
25
50
100
200