Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d3658f26
Commit
d3658f26
authored
Aug 21, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http.sys: Create a stub request queue device.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
128dd3be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
http.c
dlls/http.sys/http.c
+47
-0
No files found.
dlls/http.sys/http.c
View file @
d3658f26
...
...
@@ -23,14 +23,61 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "winternl.h"
#include "winioctl.h"
#include "ddk/wdm.h"
#include "wine/debug.h"
static
HANDLE
directory_obj
;
static
DEVICE_OBJECT
*
device_obj
;
WINE_DEFAULT_DEBUG_CHANNEL
(
http
);
static
NTSTATUS
WINAPI
dispatch_create
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
STATUS_SUCCESS
;
}
static
NTSTATUS
WINAPI
dispatch_close
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
irp
->
IoStatus
.
Status
=
STATUS_SUCCESS
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
STATUS_SUCCESS
;
}
static
void
WINAPI
unload
(
DRIVER_OBJECT
*
driver
)
{
IoDeleteDevice
(
device_obj
);
NtClose
(
directory_obj
);
}
NTSTATUS
WINAPI
DriverEntry
(
DRIVER_OBJECT
*
driver
,
UNICODE_STRING
*
path
)
{
static
const
WCHAR
device_nameW
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'H'
,
't'
,
't'
,
'p'
,
'\\'
,
'R'
,
'e'
,
'q'
,
'Q'
,
'u'
,
'e'
,
'u'
,
'e'
,
0
};
static
const
WCHAR
directory_nameW
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'H'
,
't'
,
't'
,
'p'
,
0
};
OBJECT_ATTRIBUTES
attr
=
{
sizeof
(
attr
)};
UNICODE_STRING
string
;
NTSTATUS
ret
;
TRACE
(
"driver %p, path %s.
\n
"
,
driver
,
debugstr_w
(
path
->
Buffer
));
RtlInitUnicodeString
(
&
string
,
directory_nameW
);
attr
.
ObjectName
=
&
string
;
if
((
ret
=
NtCreateDirectoryObject
(
&
directory_obj
,
0
,
&
attr
))
&&
ret
!=
STATUS_OBJECT_NAME_COLLISION
)
ERR
(
"Failed to create
\\
Device
\\
Http directory, status %#x.
\n
"
,
ret
);
RtlInitUnicodeString
(
&
string
,
device_nameW
);
if
((
ret
=
IoCreateDevice
(
driver
,
0
,
&
string
,
FILE_DEVICE_UNKNOWN
,
0
,
FALSE
,
&
device_obj
)))
{
ERR
(
"Failed to create request queue device, status %#x.
\n
"
,
ret
);
NtClose
(
directory_obj
);
return
ret
;
}
driver
->
MajorFunction
[
IRP_MJ_CREATE
]
=
dispatch_create
;
driver
->
MajorFunction
[
IRP_MJ_CLOSE
]
=
dispatch_close
;
driver
->
DriverUnload
=
unload
;
return
STATUS_SUCCESS
;
}
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