Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7ac931ac
Commit
7ac931ac
authored
Dec 18, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Added implementation for IoCreateDriver and IoDeleteDriver.
parent
c69468dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
2 deletions
+51
-2
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+47
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+2
-2
wdm.h
include/ddk/wdm.h
+2
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
7ac931ac
...
...
@@ -268,6 +268,53 @@ PIO_WORKITEM WINAPI IoAllocateWorkItem( PDEVICE_OBJECT DeviceObject )
/***********************************************************************
* IoCreateDriver (NTOSKRNL.EXE.@)
*/
NTSTATUS
WINAPI
IoCreateDriver
(
UNICODE_STRING
*
name
,
PDRIVER_INITIALIZE
init
)
{
DRIVER_OBJECT
*
driver
;
DRIVER_EXTENSION
*
extension
;
NTSTATUS
status
;
if
(
!
(
driver
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
driver
)
+
sizeof
(
*
extension
)
)))
return
STATUS_NO_MEMORY
;
if
((
status
=
RtlDuplicateUnicodeString
(
1
,
name
,
&
driver
->
DriverName
)))
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
driver
);
return
status
;
}
extension
=
(
DRIVER_EXTENSION
*
)(
driver
+
1
);
driver
->
Size
=
sizeof
(
*
driver
);
driver
->
DriverInit
=
init
;
driver
->
DriverExtension
=
extension
;
extension
->
DriverObject
=
driver
;
extension
->
ServiceKeyName
=
driver
->
DriverName
;
status
=
driver
->
DriverInit
(
driver
,
name
);
if
(
status
)
{
RtlFreeUnicodeString
(
&
driver
->
DriverName
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
driver
);
}
return
status
;
}
/***********************************************************************
* IoDeleteDriver (NTOSKRNL.EXE.@)
*/
void
WINAPI
IoDeleteDriver
(
DRIVER_OBJECT
*
driver
)
{
RtlFreeUnicodeString
(
&
driver
->
DriverName
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
driver
);
}
/***********************************************************************
* IoCreateDevice (NTOSKRNL.EXE.@)
*/
NTSTATUS
WINAPI
IoCreateDevice
(
DRIVER_OBJECT
*
driver
,
ULONG
ext_size
,
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
7ac931ac
...
...
@@ -338,7 +338,7 @@
@ stub IoCreateController
@ stdcall IoCreateDevice(ptr long ptr long long long ptr)
@ stub IoCreateDisk
@ st
ub IoCreateDriver
@ st
dcall IoCreateDriver(ptr ptr)
@ stub IoCreateFile
@ stub IoCreateFileSpecifyDeviceObjectHint
@ stub IoCreateNotificationEvent
...
...
@@ -354,7 +354,7 @@
@ stub IoCsqRemoveNextIrp
@ stub IoDeleteController
@ stdcall IoDeleteDevice(ptr)
@ st
ub IoDeleteDriver
@ st
dcall IoDeleteDriver(ptr)
@ stub IoDeleteSymbolicLink
@ stub IoDetachDevice
@ stub IoDeviceHandlerObjectSize
...
...
include/ddk/wdm.h
View file @
7ac931ac
...
...
@@ -878,8 +878,10 @@ void WINAPI ExFreePool(PVOID);
void
WINAPI
ExFreePoolWithTag
(
PVOID
,
ULONG
);
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
*
);
void
WINAPI
IoDeleteDevice
(
DEVICE_OBJECT
*
);
void
WINAPI
IoDeleteDriver
(
DRIVER_OBJECT
*
);
NTSTATUS
WINAPI
IoDeleteSymbolicLink
(
UNICODE_STRING
*
);
PEPROCESS
WINAPI
IoGetCurrentProcess
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment