[Wine-patches] [eterhack 2/7] ntoskrnl.exe: Add IoCallDriver, IoCompleteRequest and ObDereferenceObject.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Чт Мар 26 19:53:56 MSK 2009


---
 dlls/ntoskrnl.exe/ntoskrnl.c        |   43 ++++++++++++++++++++++++++++------
 dlls/ntoskrnl.exe/ntoskrnl.exe.spec |    6 ++--
 include/ddk/wdm.h                   |    3 ++
 3 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 545ac6e..98aae05 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1745,14 +1745,9 @@ NTSTATUS WINAPI IoGetDeviceProperty( PDEVICE_OBJECT DeviceObject,
 
 
 /***********************************************************************
- *           IofCallDriver   (NTOSKRNL.EXE.@)
+ *           IoCallDriver   (NTOSKRNL.EXE.@)
  */
-#ifdef DEFINE_FASTCALL2_ENTRYPOINT
-DEFINE_FASTCALL2_ENTRYPOINT( IofCallDriver )
-NTSTATUS WINAPI __regs_IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
-#else
-NTSTATUS WINAPI IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
-#endif
+NTSTATUS WINAPI IoCallDriver( DEVICE_OBJECT *device, IRP *irp )
 {
     PDRIVER_DISPATCH dispatch;
     IO_STACK_LOCATION *irpsp;
@@ -1777,6 +1772,20 @@ NTSTATUS WINAPI IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
     return status;
 }
 
+
+/***********************************************************************
+ *           IofCallDriver   (NTOSKRNL.EXE.@)
+ */
+#ifdef DEFINE_FASTCALL2_ENTRYPOINT
+DEFINE_FASTCALL2_ENTRYPOINT( IofCallDriver )
+NTSTATUS WINAPI __regs_IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
+#else
+NTSTATUS WINAPI IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
+#endif
+{
+    return IoCallDriver( device, irp );
+}
+
 /***********************************************************************
  *           IoGetAttachedDeviceReference    (NTOSKRNL.EXE.@)
  */
@@ -1961,6 +1970,15 @@ void CDECL wine_complete_request( IRP *irp, UCHAR priority_boost )
 
 
 /***********************************************************************
+ *           IoCompleteRequest   (NTOSKRNL.EXE.@)
+ */
+void WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
+{
+    return wine_complete_request( irp, priority_boost );
+}
+
+
+/***********************************************************************
  *           IofCompleteRequest   (NTOSKRNL.EXE.@)
  */
 #ifdef DEFINE_FASTCALL2_ENTRYPOINT
@@ -2666,6 +2684,15 @@ NTSTATUS WINAPI ObReferenceObjectByPointer( VOID *obj, ACCESS_MASK access,
 
 
 /***********************************************************************
+ *           ObDereferenceObject   (NTOSKRNL.EXE.@)
+ */
+void WINAPI ObDereferenceObject( VOID *obj )
+{
+    TRACE( "stub: %p\n", obj );
+}
+
+
+/***********************************************************************
  *           ObfDereferenceObject   (NTOSKRNL.EXE.@)
  */
 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
@@ -2675,7 +2702,7 @@ void WINAPI __regs_ObfDereferenceObject( VOID *obj )
 void WINAPI ObfDereferenceObject( VOID *obj )
 #endif
 {
-    TRACE( "stub: %p\n", obj );
+    ObDereferenceObject( obj );
 }
 
 
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 0771061..db8f12f 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -323,7 +323,7 @@
 @ stdcall IoBuildDeviceIoControlRequest(long ptr ptr long ptr long long ptr ptr)
 @ stub IoBuildPartialMdl
 @ stub IoBuildSynchronousFsdRequest
-@ stub IoCallDriver
+@ stdcall IoCallDriver(ptr ptr)
 @ stub IoCancelFileOpen
 @ stub IoCancelIrp
 @ stub IoCheckDesiredAccess
@@ -333,7 +333,7 @@
 @ stub IoCheckQuerySetVolumeInformation
 @ stub IoCheckQuotaBufferValidity
 @ stub IoCheckShareAccess
-@ stub IoCompleteRequest
+@ stdcall IoCompleteRequest(ptr long)
 @ stub IoConnectInterrupt
 @ stub IoCreateController
 @ stdcall IoCreateDevice(ptr long ptr long long long ptr)
@@ -798,7 +798,7 @@
 @ stub ObCloseHandle
 @ stub ObCreateObject
 @ stub ObCreateObjectType
-@ stub ObDereferenceObject
+@ stdcall ObDereferenceObject(ptr)
 @ stub ObDereferenceSecurityDescriptor
 @ stub ObFindHandleForObject
 @ stub ObGetObjectSecurity
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index 93d9496..3a369ec 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1144,6 +1144,8 @@ NTSTATUS  WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOI
 PVOID     WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR);
 PIRP      WINAPI IoAllocateIrp(CCHAR,BOOLEAN);
 PIRP      WINAPI IoBuildDeviceIoControlRequest(ULONG,PDEVICE_OBJECT,PVOID,ULONG,PVOID,ULONG,BOOLEAN,PKEVENT,PIO_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**);
 NTSTATUS  WINAPI IoCreateDriver(UNICODE_STRING*,PDRIVER_INITIALIZE);
 NTSTATUS  WINAPI IoCreateSymbolicLink(UNICODE_STRING*,UNICODE_STRING*);
@@ -1189,6 +1191,7 @@ PVOID     WINAPI MmMapLockedPagesSpecifyCache(PMDL,KPROCESSOR_MODE,MEMORY_CACHIN
 NTSTATUS  WINAPI MmProtectMdlSystemAddress(PMDL,ULONG);
 MM_SYSTEMSIZE WINAPI MmQuerySystemSize(void);
 
+void      WINAPI ObDereferenceObject(VOID*);
 NTSTATUS  WINAPI ObReferenceObjectByHandle(HANDLE,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE,PVOID*,POBJECT_HANDLE_INFORMATION);
 NTSTATUS  WINAPI ObReferenceObjectByPointer(VOID*,ACCESS_MASK,POBJECT_TYPE,KPROCESSOR_MODE);
 
-- 
1.6.1.3.GIT



Подробная информация о списке рассылки Wine-patches