mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
[KS]
Fix some prototypes and some MSVC/x64 warnings svn path=/trunk/; revision=63214
This commit is contained in:
parent
97ab95bca6
commit
5984090c7b
8 changed files with 54 additions and 50 deletions
|
@ -1140,7 +1140,7 @@ KsSynchronousIoControlDevice(
|
||||||
if (Status)
|
if (Status)
|
||||||
{
|
{
|
||||||
/* store bytes returned */
|
/* store bytes returned */
|
||||||
*BytesReturned = IoStatusBlock.Information;
|
*BytesReturned = (ULONG)IoStatusBlock.Information;
|
||||||
/* return status */
|
/* return status */
|
||||||
return IoStatusBlock.Status;
|
return IoStatusBlock.Status;
|
||||||
}
|
}
|
||||||
|
@ -1181,7 +1181,7 @@ KsSynchronousIoControlDevice(
|
||||||
Status = IoStatusBlock.Status;
|
Status = IoStatusBlock.Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
*BytesReturned = IoStatusBlock.Information;
|
*BytesReturned = (ULONG)IoStatusBlock.Information;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ NTSTATUS
|
||||||
KspEnableEvent(
|
KspEnableEvent(
|
||||||
IN PIRP Irp,
|
IN PIRP Irp,
|
||||||
IN ULONG EventSetsCount,
|
IN ULONG EventSetsCount,
|
||||||
IN PKSEVENT_SET EventSet,
|
IN const KSEVENT_SET* EventSet,
|
||||||
IN OUT PLIST_ENTRY EventsList OPTIONAL,
|
IN OUT PLIST_ENTRY EventsList OPTIONAL,
|
||||||
IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
|
IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
|
||||||
IN PVOID EventsLock OPTIONAL,
|
IN PVOID EventsLock OPTIONAL,
|
||||||
|
@ -99,7 +99,7 @@ KspEnableEvent(
|
||||||
KSEVENT Event;
|
KSEVENT Event;
|
||||||
PKSEVENT_ITEM EventItem, FoundEventItem;
|
PKSEVENT_ITEM EventItem, FoundEventItem;
|
||||||
PKSEVENTDATA EventData;
|
PKSEVENTDATA EventData;
|
||||||
PKSEVENT_SET FoundEventSet;
|
const KSEVENT_SET* FoundEventSet;
|
||||||
PKSEVENT_ENTRY EventEntry;
|
PKSEVENT_ENTRY EventEntry;
|
||||||
ULONG Index, SubIndex, Size;
|
ULONG Index, SubIndex, Size;
|
||||||
PVOID Object;
|
PVOID Object;
|
||||||
|
@ -398,18 +398,19 @@ KsEnableEvent(
|
||||||
/*
|
/*
|
||||||
@implemented
|
@implemented
|
||||||
*/
|
*/
|
||||||
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||||
KSDDKAPI
|
KSDDKAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KsEnableEventWithAllocator(
|
KsEnableEventWithAllocator(
|
||||||
IN PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
IN ULONG EventSetsCount,
|
_In_ ULONG EventSetsCount,
|
||||||
IN PKSEVENT_SET EventSet,
|
_In_reads_(EventSetsCount) const KSEVENT_SET* EventSet,
|
||||||
IN OUT PLIST_ENTRY EventsList OPTIONAL,
|
_Inout_opt_ PLIST_ENTRY EventsList,
|
||||||
IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
|
_In_opt_ KSEVENTS_LOCKTYPE EventsFlags,
|
||||||
IN PVOID EventsLock OPTIONAL,
|
_In_opt_ PVOID EventsLock,
|
||||||
IN PFNKSALLOCATOR Allocator OPTIONAL,
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
||||||
IN ULONG EventItemSize OPTIONAL)
|
_In_opt_ ULONG EventItemSize)
|
||||||
{
|
{
|
||||||
return KspEnableEvent(Irp, EventSetsCount, EventSet, EventsList, EventsFlags, EventsLock, Allocator, EventItemSize);
|
return KspEnableEvent(Irp, EventSetsCount, EventSet, EventsList, EventsFlags, EventsLock, Allocator, EventItemSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ NTSTATUS
|
||||||
KspEnableEvent(
|
KspEnableEvent(
|
||||||
IN PIRP Irp,
|
IN PIRP Irp,
|
||||||
IN ULONG EventSetsCount,
|
IN ULONG EventSetsCount,
|
||||||
IN PKSEVENT_SET EventSet,
|
IN const KSEVENT_SET* EventSet,
|
||||||
IN OUT PLIST_ENTRY EventsList OPTIONAL,
|
IN OUT PLIST_ENTRY EventsList OPTIONAL,
|
||||||
IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
|
IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL,
|
||||||
IN PVOID EventsLock OPTIONAL,
|
IN PVOID EventsLock OPTIONAL,
|
||||||
|
|
|
@ -147,7 +147,7 @@ KspMethodHandlerWithAllocator(
|
||||||
if (Allocator)
|
if (Allocator)
|
||||||
{
|
{
|
||||||
/* allocate the requested amount */
|
/* allocate the requested amount */
|
||||||
Status = Allocator(Irp, Irp->IoStatus.Information, FALSE);
|
Status = Allocator(Irp, (ULONG)Irp->IoStatus.Information, FALSE);
|
||||||
|
|
||||||
/* check if the block was allocated */
|
/* check if the block was allocated */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -189,13 +189,14 @@ KspMethodHandlerWithAllocator(
|
||||||
/*
|
/*
|
||||||
@implemented
|
@implemented
|
||||||
*/
|
*/
|
||||||
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||||
KSDDKAPI
|
KSDDKAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KsMethodHandler(
|
KsMethodHandler(
|
||||||
IN PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
IN ULONG MethodSetsCount,
|
_In_ ULONG MethodSetsCount,
|
||||||
IN PKSMETHOD_SET MethodSet)
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET* MethodSet)
|
||||||
{
|
{
|
||||||
return KspMethodHandlerWithAllocator(Irp, MethodSetsCount, MethodSet, NULL, 0);
|
return KspMethodHandlerWithAllocator(Irp, MethodSetsCount, MethodSet, NULL, 0);
|
||||||
}
|
}
|
||||||
|
@ -203,15 +204,16 @@ KsMethodHandler(
|
||||||
/*
|
/*
|
||||||
@implemented
|
@implemented
|
||||||
*/
|
*/
|
||||||
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||||
KSDDKAPI
|
KSDDKAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KsMethodHandlerWithAllocator(
|
KsMethodHandlerWithAllocator(
|
||||||
IN PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
IN ULONG MethodSetsCount,
|
_In_ ULONG MethodSetsCount,
|
||||||
IN PKSMETHOD_SET MethodSet,
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET* MethodSet,
|
||||||
IN PFNKSALLOCATOR Allocator OPTIONAL,
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
||||||
IN ULONG MethodItemSize OPTIONAL)
|
_In_opt_ ULONG MethodItemSize)
|
||||||
{
|
{
|
||||||
return KspMethodHandlerWithAllocator(Irp, MethodSetsCount, MethodSet, Allocator, MethodItemSize);
|
return KspMethodHandlerWithAllocator(Irp, MethodSetsCount, MethodSet, Allocator, MethodItemSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ KspCopyCreateRequest(
|
||||||
OUT PVOID * Result)
|
OUT PVOID * Result)
|
||||||
{
|
{
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
ULONG ObjectLength, ParametersLength;
|
SIZE_T ObjectLength, ParametersLength;
|
||||||
PVOID Buffer;
|
PVOID Buffer;
|
||||||
|
|
||||||
/* get current irp stack */
|
/* get current irp stack */
|
||||||
|
@ -129,7 +129,7 @@ KspCopyCreateRequest(
|
||||||
|
|
||||||
/* store result */
|
/* store result */
|
||||||
*Result = Buffer;
|
*Result = Buffer;
|
||||||
*Size = ParametersLength;
|
*Size = (ULONG)ParametersLength;
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,7 +300,7 @@ KspPropertyHandler(
|
||||||
if (Allocator)
|
if (Allocator)
|
||||||
{
|
{
|
||||||
/* allocate the requested amount */
|
/* allocate the requested amount */
|
||||||
Status = Allocator(Irp, Irp->IoStatus.Information, FALSE);
|
Status = Allocator(Irp, (ULONG)Irp->IoStatus.Information, FALSE);
|
||||||
|
|
||||||
/* check if the block was allocated */
|
/* check if the block was allocated */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
@ -364,15 +364,16 @@ KsPropertyHandler(
|
||||||
/*
|
/*
|
||||||
@implemented
|
@implemented
|
||||||
*/
|
*/
|
||||||
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||||
KSDDKAPI
|
KSDDKAPI
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
KsPropertyHandlerWithAllocator(
|
KsPropertyHandlerWithAllocator(
|
||||||
IN PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
IN ULONG PropertySetsCount,
|
_In_ ULONG PropertySetsCount,
|
||||||
IN PKSPROPERTY_SET PropertySet,
|
_In_reads_(PropertySetsCount) const KSPROPERTY_SET* PropertySet,
|
||||||
IN PFNKSALLOCATOR Allocator OPTIONAL,
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
||||||
IN ULONG PropertyItemSize OPTIONAL)
|
_In_opt_ ULONG PropertyItemSize)
|
||||||
{
|
{
|
||||||
return KspPropertyHandler(Irp, PropertySetsCount, PropertySet, Allocator, PropertyItemSize);
|
return KspPropertyHandler(Irp, PropertySetsCount, PropertySet, Allocator, PropertyItemSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,7 +329,7 @@ KspCreateDeviceReference(
|
||||||
IN LPWSTR ReferenceString)
|
IN LPWSTR ReferenceString)
|
||||||
{
|
{
|
||||||
LPWSTR DeviceName;
|
LPWSTR DeviceName;
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
PLIST_ENTRY Entry;
|
PLIST_ENTRY Entry;
|
||||||
PBUS_DEVICE_ENTRY DeviceEntry = NULL; /* GCC warning */
|
PBUS_DEVICE_ENTRY DeviceEntry = NULL; /* GCC warning */
|
||||||
BOOLEAN ItemExists = FALSE;
|
BOOLEAN ItemExists = FALSE;
|
||||||
|
@ -523,7 +523,7 @@ KspBusQueryReferenceString(
|
||||||
IN OUT PWCHAR *String)
|
IN OUT PWCHAR *String)
|
||||||
{
|
{
|
||||||
LPWSTR Name;
|
LPWSTR Name;
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension = (PBUS_ENUM_DEVICE_EXTENSION)Context;
|
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension = (PBUS_ENUM_DEVICE_EXTENSION)Context;
|
||||||
|
|
||||||
/* sanity checks */
|
/* sanity checks */
|
||||||
|
@ -665,7 +665,7 @@ KspDoReparseForIrp(
|
||||||
PIRP Irp,
|
PIRP Irp,
|
||||||
PBUS_DEVICE_ENTRY DeviceEntry)
|
PBUS_DEVICE_ENTRY DeviceEntry)
|
||||||
{
|
{
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
LPWSTR Buffer;
|
LPWSTR Buffer;
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
|
|
||||||
|
@ -885,7 +885,7 @@ KspQueryId(
|
||||||
PBUS_DEVICE_ENTRY DeviceEntry;
|
PBUS_DEVICE_ENTRY DeviceEntry;
|
||||||
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension;
|
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension;
|
||||||
LPWSTR Name;
|
LPWSTR Name;
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
|
|
||||||
/* get current irp stack location */
|
/* get current irp stack location */
|
||||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
@ -972,7 +972,7 @@ KspInstallInterface(
|
||||||
IN PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension,
|
IN PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension,
|
||||||
IN PSWENUM_INSTALL_INTERFACE InstallInterface)
|
IN PSWENUM_INSTALL_INTERFACE InstallInterface)
|
||||||
{
|
{
|
||||||
ULONG Length, Index;
|
SIZE_T Length, Index;
|
||||||
UNICODE_STRING DeviceString, InterfaceString, ReferenceString;
|
UNICODE_STRING DeviceString, InterfaceString, ReferenceString;
|
||||||
HANDLE hKey, hDeviceKey, hInterfaceKey, hReferenceKey;
|
HANDLE hKey, hDeviceKey, hInterfaceKey, hReferenceKey;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -1369,7 +1369,7 @@ KsGetBusEnumIdentifier(
|
||||||
PDEV_EXTENSION DeviceExtension;
|
PDEV_EXTENSION DeviceExtension;
|
||||||
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension;
|
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension;
|
||||||
PIO_STACK_LOCATION IoStack;
|
PIO_STACK_LOCATION IoStack;
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
LPWSTR Buffer;
|
LPWSTR Buffer;
|
||||||
|
|
||||||
|
@ -1489,7 +1489,7 @@ KsCreateBusEnumObject(
|
||||||
IN REFGUID InterfaceGuid OPTIONAL,
|
IN REFGUID InterfaceGuid OPTIONAL,
|
||||||
IN PWCHAR ServiceRelativePath OPTIONAL)
|
IN PWCHAR ServiceRelativePath OPTIONAL)
|
||||||
{
|
{
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
UNICODE_STRING ServiceKeyPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Services\\");
|
UNICODE_STRING ServiceKeyPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Services\\");
|
||||||
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension;
|
PBUS_ENUM_DEVICE_EXTENSION BusDeviceExtension;
|
||||||
|
|
|
@ -3525,7 +3525,7 @@ NTAPI
|
||||||
KsMethodHandler(
|
KsMethodHandler(
|
||||||
_In_ PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
_In_ ULONG MethodSetsCount,
|
_In_ ULONG MethodSetsCount,
|
||||||
_In_reads_(MethodSetsCount) const PKSMETHOD_SET MethodSet);
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET* MethodSet);
|
||||||
|
|
||||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||||
KSDDKAPI
|
KSDDKAPI
|
||||||
|
@ -3534,7 +3534,7 @@ NTAPI
|
||||||
KsMethodHandlerWithAllocator(
|
KsMethodHandlerWithAllocator(
|
||||||
_In_ PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
_In_ ULONG MethodSetsCount,
|
_In_ ULONG MethodSetsCount,
|
||||||
_In_reads_(MethodSetsCount) const PKSMETHOD_SET MethodSet,
|
_In_reads_(MethodSetsCount) const KSMETHOD_SET* MethodSet,
|
||||||
_In_opt_ PFNKSALLOCATOR Allocator,
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
||||||
_In_opt_ ULONG MethodItemSize);
|
_In_opt_ ULONG MethodItemSize);
|
||||||
|
|
||||||
|
@ -3576,7 +3576,7 @@ NTAPI
|
||||||
KsPropertyHandlerWithAllocator(
|
KsPropertyHandlerWithAllocator(
|
||||||
_In_ PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
_In_ ULONG PropertySetsCount,
|
_In_ ULONG PropertySetsCount,
|
||||||
_In_reads_(PropertySetsCount) const PKSPROPERTY_SET PropertySet,
|
_In_reads_(PropertySetsCount) const KSPROPERTY_SET* PropertySet,
|
||||||
_In_opt_ PFNKSALLOCATOR Allocator,
|
_In_opt_ PFNKSALLOCATOR Allocator,
|
||||||
_In_opt_ ULONG PropertyItemSize);
|
_In_opt_ ULONG PropertyItemSize);
|
||||||
|
|
||||||
|
@ -3659,7 +3659,7 @@ NTAPI
|
||||||
KsEnableEventWithAllocator(
|
KsEnableEventWithAllocator(
|
||||||
_In_ PIRP Irp,
|
_In_ PIRP Irp,
|
||||||
_In_ ULONG EventSetsCount,
|
_In_ ULONG EventSetsCount,
|
||||||
_In_reads_(EventSetsCount) const PKSEVENT_SET EventSet,
|
_In_reads_(EventSetsCount) const KSEVENT_SET* EventSet,
|
||||||
_Inout_opt_ PLIST_ENTRY EventsList,
|
_Inout_opt_ PLIST_ENTRY EventsList,
|
||||||
_In_opt_ KSEVENTS_LOCKTYPE EventsFlags,
|
_In_opt_ KSEVENTS_LOCKTYPE EventsFlags,
|
||||||
_In_opt_ PVOID EventsLock,
|
_In_opt_ PVOID EventsLock,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue