mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
Use W32API.
svn path=/trunk/; revision=15970
This commit is contained in:
parent
d604caaaf3
commit
317d4942bd
9 changed files with 15 additions and 10 deletions
|
@ -1,5 +1,6 @@
|
||||||
<module name="blue" type="kernelmodedriver" installbase="system32/drivers" installname="blue.sys">
|
<module name="blue" type="kernelmodedriver" installbase="system32/drivers" installname="blue.sys">
|
||||||
<bootstrap base="reactos" />
|
<bootstrap base="reactos" />
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<file>blue.c</file>
|
<file>blue.c</file>
|
||||||
|
|
|
@ -25,7 +25,8 @@
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ddk/ntddk.h>
|
||||||
#include <ddk/ntbootvid.h>
|
#include <ddk/ntbootvid.h>
|
||||||
#include <rosrtl/string.h>
|
#include <ntos/ldrtypes.h>
|
||||||
|
#include <ddk/ldrfuncs.h>
|
||||||
#include "bootvid.h"
|
#include "bootvid.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
@ -634,7 +635,7 @@ NTSTATUS STDCALL
|
||||||
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||||
{
|
{
|
||||||
PDEVICE_OBJECT BootVidDevice;
|
PDEVICE_OBJECT BootVidDevice;
|
||||||
UNICODE_STRING DeviceName;
|
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\BootVid");
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
BootVidDriverObject = DriverObject;
|
BootVidDriverObject = DriverObject;
|
||||||
|
@ -648,8 +649,6 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
||||||
DriverObject->Flags |= DO_BUFFERED_IO;
|
DriverObject->Flags |= DO_BUFFERED_IO;
|
||||||
|
|
||||||
/* Create device */
|
/* Create device */
|
||||||
RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\Device\\BootVid");
|
|
||||||
|
|
||||||
Status = IoCreateDevice(
|
Status = IoCreateDevice(
|
||||||
DriverObject,
|
DriverObject,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="bootvid" type="kernelmodedriver" installbase="system32/drivers" installname="bootvid.sys">
|
<module name="bootvid" type="kernelmodedriver" installbase="system32/drivers" installname="bootvid.sys">
|
||||||
<include base="bootvid">.</include>
|
<include base="bootvid">.</include>
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<file>bootvid.c</file>
|
<file>bootvid.c</file>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="debugout" type="kernelmodedriver">
|
<module name="debugout" type="kernelmodedriver">
|
||||||
<include base="debugout">.</include>
|
<include base="debugout">.</include>
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<file>debugout.c</file>
|
<file>debugout.c</file>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="mpu401" type="kernelmodedriver">
|
<module name="mpu401" type="kernelmodedriver">
|
||||||
<include base="mpu401">.</include>
|
<include base="mpu401">.</include>
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<file>mpu401.c</file>
|
<file>mpu401.c</file>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="parallel" type="kernelmodedriver">
|
<module name="parallel" type="kernelmodedriver">
|
||||||
<include base="parallel">.</include>
|
<include base="parallel">.</include>
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<file>parallel.c</file>
|
<file>parallel.c</file>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <ntddk.h>
|
#include <ntddk.h>
|
||||||
|
#include <ntdddisk.h>
|
||||||
#include "ramdrv.h"
|
#include "ramdrv.h"
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <rosrtl/string.h>
|
|
||||||
#include "../../lib/bzip2/bzlib.h"
|
#include "../../lib/bzip2/bzlib.h"
|
||||||
|
|
||||||
NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
|
NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject,
|
||||||
|
@ -84,11 +84,12 @@ NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject,
|
||||||
NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject,
|
NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||||
IN PUNICODE_STRING RegistryPath)
|
IN PUNICODE_STRING RegistryPath)
|
||||||
{
|
{
|
||||||
UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Ramdisk");
|
UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Ramdisk");
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
PRAMDRV_DEVICE_EXTENSION devext;
|
PRAMDRV_DEVICE_EXTENSION devext;
|
||||||
UNICODE_STRING LinkName;
|
UNICODE_STRING LinkName = RTL_CONSTANT_STRING(L"\\??\\Z:");
|
||||||
|
UNICODE_STRING ImageName = RTL_CONSTANT_STRING(L"\\Device\\Floppy0\\ramdisk.bz2");
|
||||||
HANDLE file;
|
HANDLE file;
|
||||||
OBJECT_ATTRIBUTES objattr;
|
OBJECT_ATTRIBUTES objattr;
|
||||||
IO_STATUS_BLOCK iosb;
|
IO_STATUS_BLOCK iosb;
|
||||||
|
@ -128,12 +129,10 @@ NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject,
|
||||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
goto cleandevice;
|
goto cleandevice;
|
||||||
}
|
}
|
||||||
RtlRosInitUnicodeStringFromLiteral( &LinkName, L"\\??\\Z:" );
|
|
||||||
IoCreateSymbolicLink( &LinkName, &DeviceName );
|
IoCreateSymbolicLink( &LinkName, &DeviceName );
|
||||||
|
|
||||||
RtlRosInitUnicodeStringFromLiteral( &LinkName, L"\\Device\\Floppy0\\ramdisk.bz2" );
|
|
||||||
InitializeObjectAttributes( &objattr,
|
InitializeObjectAttributes( &objattr,
|
||||||
&LinkName,
|
&ImageName,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0 );
|
0 );
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<module name="ramdrv" type="kernelmodedriver">
|
<module name="ramdrv" type="kernelmodedriver">
|
||||||
<include base="ramdrv">.</include>
|
<include base="ramdrv">.</include>
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<library>bzip2</library>
|
<library>bzip2</library>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<module name="sound" type="kernelmodedriver">
|
<module name="sound" type="kernelmodedriver">
|
||||||
|
<define name="__USE_W32API" />
|
||||||
<library>ntoskrnl</library>
|
<library>ntoskrnl</library>
|
||||||
<library>hal</library>
|
<library>hal</library>
|
||||||
<file>dsp.c</file>
|
<file>dsp.c</file>
|
||||||
|
|
Loading…
Reference in a new issue