Fix a memory leak if VideoPortInitialize is called more than once from the same miniport.

Replace STDCALL with NTAPI.

svn path=/trunk/; revision=17520
This commit is contained in:
Filip Navara 2005-08-24 21:29:24 +00:00
parent de881e611a
commit 98d9c65720
13 changed files with 176 additions and 153 deletions

View file

@ -91,7 +91,7 @@ IopInitiatePnpIrp(
} }
BOOLEAN STDCALL BOOLEAN NTAPI
IntAgpCommitPhysical( IntAgpCommitPhysical(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID PhysicalContext, IN PVOID PhysicalContext,
@ -123,7 +123,7 @@ IntAgpCommitPhysical(
return NT_SUCCESS(Status); return NT_SUCCESS(Status);
} }
VOID STDCALL VOID NTAPI
IntAgpFreePhysical( IntAgpFreePhysical(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID PhysicalContext, IN PVOID PhysicalContext,
@ -151,7 +151,7 @@ IntAgpFreePhysical(
} }
} }
VOID STDCALL VOID NTAPI
IntAgpReleasePhysical( IntAgpReleasePhysical(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID PhysicalContext) IN PVOID PhysicalContext)
@ -180,7 +180,7 @@ IntAgpReleasePhysical(
ExFreePool(AgpMapping); ExFreePool(AgpMapping);
} }
PHYSICAL_ADDRESS STDCALL PHYSICAL_ADDRESS NTAPI
IntAgpReservePhysical( IntAgpReservePhysical(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG Pages, IN ULONG Pages,
@ -245,7 +245,7 @@ IntAgpReservePhysical(
} }
PVOID STDCALL PVOID NTAPI
IntAgpCommitVirtual( IntAgpCommitVirtual(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID VirtualContext, IN PVOID VirtualContext,
@ -327,7 +327,7 @@ IntAgpCommitVirtual(
return BaseAddress; return BaseAddress;
} }
VOID STDCALL VOID NTAPI
IntAgpFreeVirtual( IntAgpFreeVirtual(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID VirtualContext, IN PVOID VirtualContext,
@ -381,7 +381,7 @@ IntAgpFreeVirtual(
} }
} }
VOID STDCALL VOID NTAPI
IntAgpReleaseVirtual( IntAgpReleaseVirtual(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID VirtualContext) IN PVOID VirtualContext)
@ -415,7 +415,7 @@ IntAgpReleaseVirtual(
ExFreePool(VirtualMapping); ExFreePool(VirtualMapping);
} }
PVOID STDCALL PVOID NTAPI
IntAgpReserveVirtual( IntAgpReserveVirtual(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN HANDLE ProcessHandle, IN HANDLE ProcessHandle,
@ -475,7 +475,7 @@ IntAgpReserveVirtual(
} }
BOOLEAN STDCALL BOOLEAN NTAPI
IntAgpSetRate( IntAgpSetRate(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG Rate) IN ULONG Rate)
@ -492,7 +492,7 @@ IntAgpSetRate(
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntAgpGetInterface( IntAgpGetInterface(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN OUT PINTERFACE Interface) IN OUT PINTERFACE Interface)

View file

@ -168,7 +168,7 @@ I2CRepStart(PVOID HwDeviceExtension, PI2C_CALLBACKS i2c, UCHAR Address)
* @implemented * @implemented
*/ */
BOOLEAN STDCALL BOOLEAN NTAPI
VideoPortDDCMonitorHelper( VideoPortDDCMonitorHelper(
PVOID HwDeviceExtension, PVOID HwDeviceExtension,
PVOID I2CFunctions, PVOID I2CFunctions,

View file

@ -25,8 +25,8 @@
/* EXTERNAL FUNCTIONS *********************************************************/ /* EXTERNAL FUNCTIONS *********************************************************/
VOID STDCALL HalAcquireDisplayOwnership(IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); VOID NTAPI HalAcquireDisplayOwnership(IN PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters);
VOID STDCALL HalReleaseDisplayOwnership(); VOID NTAPI HalReleaseDisplayOwnership();
/* GLOBAL VARIABLES ***********************************************************/ /* GLOBAL VARIABLES ***********************************************************/
@ -38,7 +38,7 @@ PVIDEO_PORT_DEVICE_EXTENSION ResetDisplayParametersDeviceExtension = NULL;
* Reset display to blue screen * Reset display to blue screen
*/ */
BOOLEAN STDCALL BOOLEAN NTAPI
IntVideoPortResetDisplayParameters(ULONG Columns, ULONG Rows) IntVideoPortResetDisplayParameters(ULONG Columns, ULONG Rows)
{ {
PVIDEO_PORT_DRIVER_EXTENSION DriverExtension; PVIDEO_PORT_DRIVER_EXTENSION DriverExtension;
@ -63,7 +63,7 @@ IntVideoPortResetDisplayParameters(ULONG Columns, ULONG Rows)
return FALSE; return FALSE;
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortAddDevice( IntVideoPortAddDevice(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject) IN PDEVICE_OBJECT PhysicalDeviceObject)
@ -96,7 +96,7 @@ IntVideoPortAddDevice(
* PASSIVE_LEVEL * PASSIVE_LEVEL
*/ */
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchOpen( IntVideoPortDispatchOpen(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -166,7 +166,7 @@ IntVideoPortDispatchOpen(
* PASSIVE_LEVEL * PASSIVE_LEVEL
*/ */
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchClose( IntVideoPortDispatchClose(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -198,7 +198,7 @@ IntVideoPortDispatchClose(
* PASSIVE_LEVEL * PASSIVE_LEVEL
*/ */
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchDeviceControl( IntVideoPortDispatchDeviceControl(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -264,7 +264,7 @@ IntVideoPortDispatchDeviceControl(
return Status; return Status;
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortPnPStartDevice( IntVideoPortPnPStartDevice(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -352,7 +352,7 @@ IntVideoPortPnPStartDevice(
NTSTATUS NTSTATUS
STDCALL NTAPI
IntVideoPortForwardIrpAndWaitCompletionRoutine( IntVideoPortForwardIrpAndWaitCompletionRoutine(
PDEVICE_OBJECT Fdo, PDEVICE_OBJECT Fdo,
PIRP Irp, PIRP Irp,
@ -368,7 +368,7 @@ IntVideoPortForwardIrpAndWaitCompletionRoutine(
NTSTATUS NTSTATUS
STDCALL NTAPI
IntVideoPortForwardIrpAndWait(PDEVICE_OBJECT DeviceObject, PIRP Irp) IntVideoPortForwardIrpAndWait(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{ {
KEVENT Event; KEVENT Event;
@ -390,7 +390,7 @@ IntVideoPortForwardIrpAndWait(PDEVICE_OBJECT DeviceObject, PIRP Irp)
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchPnp( IntVideoPortDispatchPnp(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -442,7 +442,7 @@ IntVideoPortDispatchPnp(
return Status; return Status;
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchCleanup( IntVideoPortDispatchCleanup(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -459,7 +459,7 @@ IntVideoPortDispatchCleanup(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchPower( IntVideoPortDispatchPower(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp) IN PIRP Irp)
@ -467,7 +467,7 @@ IntVideoPortDispatchPower(
return STATUS_NOT_IMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
} }
VOID STDCALL VOID NTAPI
IntVideoPortUnload(PDRIVER_OBJECT DriverObject) IntVideoPortUnload(PDRIVER_OBJECT DriverObject)
{ {
} }

View file

@ -29,7 +29,7 @@
* @implemented * @implemented
*/ */
PVOID STDCALL PVOID NTAPI
VideoPortAllocateCommonBuffer( VideoPortAllocateCommonBuffer(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_DMA_ADAPTER VpDmaAdapter,
@ -49,7 +49,7 @@ VideoPortAllocateCommonBuffer(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortReleaseCommonBuffer( VideoPortReleaseCommonBuffer(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVP_DMA_ADAPTER VpDmaAdapter, IN PVP_DMA_ADAPTER VpDmaAdapter,
@ -70,7 +70,7 @@ VideoPortReleaseCommonBuffer(
* @unimplemented * @unimplemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortPutDmaAdapter( VideoPortPutDmaAdapter(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVP_DMA_ADAPTER VpDmaAdapter) IN PVP_DMA_ADAPTER VpDmaAdapter)
@ -82,7 +82,7 @@ VideoPortPutDmaAdapter(
* @unimplemented * @unimplemented
*/ */
PVP_DMA_ADAPTER STDCALL PVP_DMA_ADAPTER NTAPI
VideoPortGetDmaAdapter( VideoPortGetDmaAdapter(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVP_DEVICE_DESCRIPTION VpDeviceExtension) IN PVP_DEVICE_DESCRIPTION VpDeviceExtension)

View file

@ -29,7 +29,7 @@
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortCreateEvent( VideoPortCreateEvent(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG EventFlag, IN ULONG EventFlag,
@ -59,7 +59,7 @@ VideoPortCreateEvent(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortDeleteEvent( VideoPortDeleteEvent(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PEVENT Event) IN PEVENT Event)
@ -72,7 +72,7 @@ VideoPortDeleteEvent(
* @implemented * @implemented
*/ */
LONG STDCALL LONG NTAPI
VideoPortSetEvent( VideoPortSetEvent(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PEVENT Event) IN PEVENT Event)
@ -84,7 +84,7 @@ VideoPortSetEvent(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortClearEvent( VideoPortClearEvent(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PEVENT Event) IN PEVENT Event)
@ -96,7 +96,7 @@ VideoPortClearEvent(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortWaitForSingleObject( VideoPortWaitForSingleObject(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Object, IN PVOID Object,

View file

@ -26,7 +26,7 @@
/* PRIVATE FUNCTIONS **********************************************************/ /* PRIVATE FUNCTIONS **********************************************************/
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10AllocateBuffer( IntInt10AllocateBuffer(
IN PVOID Context, IN PVOID Context,
OUT PUSHORT Seg, OUT PUSHORT Seg,
@ -74,7 +74,7 @@ IntInt10AllocateBuffer(
return NO_ERROR; return NO_ERROR;
} }
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10FreeBuffer( IntInt10FreeBuffer(
IN PVOID Context, IN PVOID Context,
IN USHORT Seg, IN USHORT Seg,
@ -97,7 +97,7 @@ IntInt10FreeBuffer(
return Status; return Status;
} }
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10ReadMemory( IntInt10ReadMemory(
IN PVOID Context, IN PVOID Context,
IN USHORT Seg, IN USHORT Seg,
@ -121,7 +121,7 @@ IntInt10ReadMemory(
return NO_ERROR; return NO_ERROR;
} }
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10WriteMemory( IntInt10WriteMemory(
IN PVOID Context, IN PVOID Context,
IN USHORT Seg, IN USHORT Seg,
@ -145,7 +145,7 @@ IntInt10WriteMemory(
return NO_ERROR; return NO_ERROR;
} }
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10CallBios( IntInt10CallBios(
IN PVOID Context, IN PVOID Context,
IN OUT PINT10_BIOS_ARGUMENTS BiosArguments) IN OUT PINT10_BIOS_ARGUMENTS BiosArguments)
@ -200,7 +200,7 @@ IntInt10CallBios(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortInt10( VideoPortInt10(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments) IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)

View file

@ -25,7 +25,7 @@
/* PRIVATE FUNCTIONS **********************************************************/ /* PRIVATE FUNCTIONS **********************************************************/
BOOLEAN STDCALL BOOLEAN NTAPI
IntVideoPortInterruptRoutine( IntVideoPortInterruptRoutine(
IN struct _KINTERRUPT *Interrupt, IN struct _KINTERRUPT *Interrupt,
IN PVOID ServiceContext) IN PVOID ServiceContext)
@ -38,7 +38,7 @@ IntVideoPortInterruptRoutine(
&DeviceExtension->MiniPortDeviceExtension); &DeviceExtension->MiniPortDeviceExtension);
} }
BOOLEAN STDCALL BOOLEAN NTAPI
IntVideoPortSetupInterrupt( IntVideoPortSetupInterrupt(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
@ -105,7 +105,7 @@ IntVideoPortSetupInterrupt(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortEnableInterrupt(IN PVOID HwDeviceExtension) VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
{ {
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
@ -127,7 +127,7 @@ VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortDisableInterrupt(IN PVOID HwDeviceExtension) VideoPortDisableInterrupt(IN PVOID HwDeviceExtension)
{ {
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;

View file

@ -25,7 +25,7 @@
/* PRIVATE FUNCTIONS **********************************************************/ /* PRIVATE FUNCTIONS **********************************************************/
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortMapPhysicalMemory( IntVideoPortMapPhysicalMemory(
IN HANDLE Process, IN HANDLE Process,
IN PHYSICAL_ADDRESS PhysicalAddress, IN PHYSICAL_ADDRESS PhysicalAddress,
@ -76,7 +76,7 @@ IntVideoPortMapPhysicalMemory(
} }
PVOID STDCALL PVOID NTAPI
IntVideoPortMapMemory( IntVideoPortMapMemory(
IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
IN PHYSICAL_ADDRESS IoAddress, IN PHYSICAL_ADDRESS IoAddress,
@ -231,7 +231,7 @@ IntVideoPortMapMemory(
return NULL; return NULL;
} }
VOID STDCALL VOID NTAPI
IntVideoPortUnmapMemory( IntVideoPortUnmapMemory(
IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
IN PVOID MappedAddress) IN PVOID MappedAddress)
@ -283,7 +283,7 @@ IntVideoPortUnmapMemory(
* @implemented * @implemented
*/ */
PVOID STDCALL PVOID NTAPI
VideoPortGetDeviceBase( VideoPortGetDeviceBase(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PHYSICAL_ADDRESS IoAddress, IN PHYSICAL_ADDRESS IoAddress,
@ -304,7 +304,7 @@ VideoPortGetDeviceBase(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortFreeDeviceBase( VideoPortFreeDeviceBase(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID MappedAddress) IN PVOID MappedAddress)
@ -319,7 +319,7 @@ VideoPortFreeDeviceBase(
* @unimplemented * @unimplemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortMapBankedMemory( VideoPortMapBankedMemory(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PHYSICAL_ADDRESS PhysicalAddress, IN PHYSICAL_ADDRESS PhysicalAddress,
@ -341,7 +341,7 @@ VideoPortMapBankedMemory(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortMapMemory( VideoPortMapMemory(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PHYSICAL_ADDRESS PhysicalAddress, IN PHYSICAL_ADDRESS PhysicalAddress,
@ -371,7 +371,7 @@ VideoPortMapMemory(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortUnmapMemory( VideoPortUnmapMemory(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID VirtualAddress, IN PVOID VirtualAddress,
@ -390,7 +390,7 @@ VideoPortUnmapMemory(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortGetAccessRanges( VideoPortGetAccessRanges(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG NumRequestedResources, IN ULONG NumRequestedResources,
@ -579,7 +579,7 @@ VideoPortGetAccessRanges(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortVerifyAccessRanges( VideoPortVerifyAccessRanges(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG NumAccessRanges, IN ULONG NumAccessRanges,
@ -659,7 +659,7 @@ VideoPortVerifyAccessRanges(
* @unimplemented * @unimplemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortGetDeviceData( VideoPortGetDeviceData(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN VIDEO_DEVICE_DATA_TYPE DeviceDataType, IN VIDEO_DEVICE_DATA_TYPE DeviceDataType,
@ -675,7 +675,7 @@ VideoPortGetDeviceData(
* @implemented * @implemented
*/ */
PVOID STDCALL PVOID NTAPI
VideoPortAllocatePool( VideoPortAllocatePool(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN VP_POOL_TYPE PoolType, IN VP_POOL_TYPE PoolType,
@ -690,7 +690,7 @@ VideoPortAllocatePool(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortFreePool( VideoPortFreePool(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Ptr) IN PVOID Ptr)
@ -702,7 +702,7 @@ VideoPortFreePool(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortAllocateBuffer( VideoPortAllocateBuffer(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG Size, IN ULONG Size,
@ -717,7 +717,7 @@ VideoPortAllocateBuffer(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortReleaseBuffer( VideoPortReleaseBuffer(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Ptr) IN PVOID Ptr)
@ -730,7 +730,7 @@ VideoPortReleaseBuffer(
* @unimplemented * @unimplemented
*/ */
PVOID STDCALL PVOID NTAPI
VideoPortLockBuffer( VideoPortLockBuffer(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID BaseAddress, IN PVOID BaseAddress,
@ -745,7 +745,7 @@ VideoPortLockBuffer(
* @unimplemented * @unimplemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortUnlockBuffer( VideoPortUnlockBuffer(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Mdl) IN PVOID Mdl)
@ -757,7 +757,7 @@ VideoPortUnlockBuffer(
* @unimplemented * @unimplemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortSetTrappedEmulatorPorts( VideoPortSetTrappedEmulatorPorts(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG NumAccessRanges, IN ULONG NumAccessRanges,
@ -772,7 +772,7 @@ VideoPortSetTrappedEmulatorPorts(
* @implemented * @implemented
*/ */
ULONG STDCALL ULONG NTAPI
VideoPortGetBusData( VideoPortGetBusData(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN BUS_DATA_TYPE BusDataType, IN BUS_DATA_TYPE BusDataType,
@ -807,7 +807,7 @@ VideoPortGetBusData(
* @implemented * @implemented
*/ */
ULONG STDCALL ULONG NTAPI
VideoPortSetBusData( VideoPortSetBusData(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN BUS_DATA_TYPE BusDataType, IN BUS_DATA_TYPE BusDataType,

View file

@ -23,19 +23,19 @@
#include "videoprt.h" #include "videoprt.h"
VOID STDCALL VOID NTAPI
IntInterfaceReference(PVOID Context) IntInterfaceReference(PVOID Context)
{ {
/* Do nothing */ /* Do nothing */
} }
VOID STDCALL VOID NTAPI
IntInterfaceDereference(PVOID Context) IntInterfaceDereference(PVOID Context)
{ {
/* Do nothing */ /* Do nothing */
} }
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortQueryServices( VideoPortQueryServices(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN VIDEO_PORT_SERVICES ServicesType, IN VIDEO_PORT_SERVICES ServicesType,
@ -89,7 +89,7 @@ VideoPortQueryServices(
return ERROR_INVALID_FUNCTION; return ERROR_INVALID_FUNCTION;
} }
BOOLEAN STDCALL BOOLEAN NTAPI
VideoPortGetAgpServices( VideoPortGetAgpServices(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
OUT PVIDEO_PORT_AGP_SERVICES AgpServices) OUT PVIDEO_PORT_AGP_SERVICES AgpServices)

View file

@ -27,7 +27,7 @@
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortCreateSpinLock( VideoPortCreateSpinLock(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
OUT PSPIN_LOCK *SpinLock) OUT PSPIN_LOCK *SpinLock)
@ -44,7 +44,7 @@ VideoPortCreateSpinLock(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortDeleteSpinLock( VideoPortDeleteSpinLock(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock) IN PSPIN_LOCK SpinLock)
@ -58,7 +58,7 @@ VideoPortDeleteSpinLock(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortAcquireSpinLock( VideoPortAcquireSpinLock(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock, IN PSPIN_LOCK SpinLock,
@ -72,7 +72,7 @@ VideoPortAcquireSpinLock(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortAcquireSpinLockAtDpcLevel( VideoPortAcquireSpinLockAtDpcLevel(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock) IN PSPIN_LOCK SpinLock)
@ -85,7 +85,7 @@ VideoPortAcquireSpinLockAtDpcLevel(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortReleaseSpinLock( VideoPortReleaseSpinLock(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock, IN PSPIN_LOCK SpinLock,
@ -99,7 +99,7 @@ VideoPortReleaseSpinLock(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortReleaseSpinLockFromDpcLevel( VideoPortReleaseSpinLockFromDpcLevel(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PSPIN_LOCK SpinLock) IN PSPIN_LOCK SpinLock)

View file

@ -25,7 +25,7 @@
/* PRIVATE FUNCTIONS **********************************************************/ /* PRIVATE FUNCTIONS **********************************************************/
VOID STDCALL VOID NTAPI
IntVideoPortTimerRoutine( IntVideoPortTimerRoutine(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PVOID ServiceContext) IN PVOID ServiceContext)
@ -38,7 +38,7 @@ IntVideoPortTimerRoutine(
&DeviceExtension->MiniPortDeviceExtension); &DeviceExtension->MiniPortDeviceExtension);
} }
BOOLEAN STDCALL BOOLEAN NTAPI
IntVideoPortSetupTimer( IntVideoPortSetupTimer(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension) IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension)
@ -73,7 +73,7 @@ IntVideoPortSetupTimer(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortStartTimer(IN PVOID HwDeviceExtension) VideoPortStartTimer(IN PVOID HwDeviceExtension)
{ {
DPRINT("VideoPortStartTimer\n"); DPRINT("VideoPortStartTimer\n");
@ -84,7 +84,7 @@ VideoPortStartTimer(IN PVOID HwDeviceExtension)
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortStopTimer(IN PVOID HwDeviceExtension) VideoPortStopTimer(IN PVOID HwDeviceExtension)
{ {
DPRINT("VideoPortStopTimer\n"); DPRINT("VideoPortStopTimer\n");

View file

@ -30,7 +30,7 @@ PKPROCESS Csrss = NULL;
/* PRIVATE FUNCTIONS **********************************************************/ /* PRIVATE FUNCTIONS **********************************************************/
NTSTATUS STDCALL NTSTATUS NTAPI
DriverEntry( DriverEntry(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath) IN PUNICODE_STRING RegistryPath)
@ -38,7 +38,7 @@ DriverEntry(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
PVOID STDCALL PVOID NTAPI
IntVideoPortImageDirectoryEntryToData( IntVideoPortImageDirectoryEntryToData(
PVOID BaseAddress, PVOID BaseAddress,
ULONG Directory) ULONG Directory)
@ -60,7 +60,7 @@ IntVideoPortImageDirectoryEntryToData(
return (PVOID)((ULONG_PTR)BaseAddress + Va); return (PVOID)((ULONG_PTR)BaseAddress + Va);
} }
PVOID STDCALL PVOID NTAPI
IntVideoPortGetProcAddress( IntVideoPortGetProcAddress(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PUCHAR FunctionName) IN PUCHAR FunctionName)
@ -116,7 +116,7 @@ IntVideoPortGetProcAddress(
return NULL; return NULL;
} }
VOID STDCALL VOID NTAPI
IntVideoPortDeferredRoutine( IntVideoPortDeferredRoutine(
IN PKDPC Dpc, IN PKDPC Dpc,
IN PVOID DeferredContext, IN PVOID DeferredContext,
@ -128,7 +128,7 @@ IntVideoPortDeferredRoutine(
((PMINIPORT_DPC_ROUTINE)SystemArgument1)(HwDeviceExtension, SystemArgument2); ((PMINIPORT_DPC_ROUTINE)SystemArgument1)(HwDeviceExtension, SystemArgument2);
} }
ULONG STDCALL ULONG NTAPI
IntVideoPortAllocateDeviceNumber(VOID) IntVideoPortAllocateDeviceNumber(VOID)
{ {
NTSTATUS Status; NTSTATUS Status;
@ -163,7 +163,7 @@ IntVideoPortAllocateDeviceNumber(VOID)
return DeviceNumber; return DeviceNumber;
} }
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortCreateAdapterDeviceObject( IntVideoPortCreateAdapterDeviceObject(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
@ -308,7 +308,7 @@ IntVideoPortCreateAdapterDeviceObject(
/* FIXME: we have to detach the device object in IntVideoPortFindAdapter if it fails */ /* FIXME: we have to detach the device object in IntVideoPortFindAdapter if it fails */
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortFindAdapter( IntVideoPortFindAdapter(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
@ -518,7 +518,7 @@ IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState)
* @implemented * @implemented
*/ */
ULONG STDCALL ULONG NTAPI
VideoPortInitialize( VideoPortInitialize(
IN PVOID Context1, IN PVOID Context1,
IN PVOID Context2, IN PVOID Context2,
@ -533,11 +533,27 @@ VideoPortInitialize(
DPRINT("VideoPortInitialize\n"); DPRINT("VideoPortInitialize\n");
/*
* As a first thing do parameter checks.
*/
if (HwInitializationData->HwInitDataSize > sizeof(VIDEO_HW_INITIALIZATION_DATA))
{
return STATUS_REVISON_MISMATCH;
}
if (HwInitializationData->HwFindAdapter == NULL ||
HwInitializationData->HwInitialize == NULL ||
HwInitializationData->HwStartIO == NULL)
{
return STATUS_INVALID_PARAMETER;
}
/* /*
* NOTE: * NOTE:
* The driver extension can be already allocated in case that we were * The driver extension can be already allocated in case that we were
* called by legacy driver and failed detecting device. Some miniport * called by legacy driver and failed detecting device. Some miniport
* drivers in that case adjust parameters and calls VideoPortInitialize * drivers in that case adjust parameters and call VideoPortInitialize
* again. * again.
*/ */
@ -554,6 +570,34 @@ VideoPortInitialize(
{ {
return Status; return Status;
} }
/*
* Save the registry path. This should be done only once even if
* VideoPortInitialize is called multiple times.
*/
if (RegistryPath->Length != 0)
{
DriverExtension->RegistryPath.Length = 0;
DriverExtension->RegistryPath.MaximumLength =
RegistryPath->Length + sizeof(UNICODE_NULL);
DriverExtension->RegistryPath.Buffer =
ExAllocatePoolWithTag(
PagedPool,
DriverExtension->RegistryPath.MaximumLength,
TAG('U', 'S', 'T', 'R'));
if (DriverExtension->RegistryPath.Buffer == NULL)
{
RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
return STATUS_INSUFFICIENT_RESOURCES;
}
RtlCopyUnicodeString(&DriverExtension->RegistryPath, RegistryPath);
}
else
{
RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
}
} }
/* /*
@ -563,9 +607,9 @@ VideoPortInitialize(
RtlCopyMemory( RtlCopyMemory(
&DriverExtension->InitializationData, &DriverExtension->InitializationData,
HwInitializationData, HwInitializationData,
min(sizeof(VIDEO_HW_INITIALIZATION_DATA), HwInitializationData->HwInitDataSize);
HwInitializationData->HwInitDataSize)); if (HwInitializationData->HwInitDataSize <
if (sizeof(VIDEO_HW_INITIALIZATION_DATA) > HwInitializationData->HwInitDataSize) sizeof(VIDEO_HW_INITIALIZATION_DATA))
{ {
RtlZeroMemory((PVOID)((ULONG_PTR)&DriverExtension->InitializationData + RtlZeroMemory((PVOID)((ULONG_PTR)&DriverExtension->InitializationData +
HwInitializationData->HwInitDataSize), HwInitializationData->HwInitDataSize),
@ -574,27 +618,6 @@ VideoPortInitialize(
} }
DriverExtension->HwContext = HwContext; DriverExtension->HwContext = HwContext;
/* we can't use RtlDuplicateUnicodeString because only ntdll exposes it... */
if (RegistryPath->Length != 0)
{
DriverExtension->RegistryPath.Length = 0;
DriverExtension->RegistryPath.MaximumLength = RegistryPath->Length + sizeof(UNICODE_NULL);
DriverExtension->RegistryPath.Buffer = ExAllocatePoolWithTag(PagedPool,
DriverExtension->RegistryPath.MaximumLength,
TAG('U', 'S', 'T', 'R'));
if (DriverExtension->RegistryPath.Buffer == NULL)
{
RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
return STATUS_INSUFFICIENT_RESOURCES;
}
RtlCopyUnicodeString(&DriverExtension->RegistryPath, RegistryPath);
}
else
{
RtlInitUnicodeString(&DriverExtension->RegistryPath, NULL);
}
switch (HwInitializationData->HwInitDataSize) switch (HwInitializationData->HwInitDataSize)
{ {
/* /*
@ -675,7 +698,7 @@ VideoPortDebugPrint(
* @unimplemented * @unimplemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortLogError( VideoPortLogError(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVIDEO_REQUEST_PACKET Vrp OPTIONAL, IN PVIDEO_REQUEST_PACKET Vrp OPTIONAL,
@ -694,7 +717,7 @@ VideoPortLogError(
* @implemented * @implemented
*/ */
UCHAR STDCALL UCHAR NTAPI
VideoPortGetCurrentIrql(VOID) VideoPortGetCurrentIrql(VOID)
{ {
return KeGetCurrentIrql(); return KeGetCurrentIrql();
@ -707,7 +730,7 @@ typedef struct QueryRegistryCallbackContext
PMINIPORT_GET_REGISTRY_ROUTINE HwGetRegistryRoutine; PMINIPORT_GET_REGISTRY_ROUTINE HwGetRegistryRoutine;
} QUERY_REGISTRY_CALLBACK_CONTEXT, *PQUERY_REGISTRY_CALLBACK_CONTEXT; } QUERY_REGISTRY_CALLBACK_CONTEXT, *PQUERY_REGISTRY_CALLBACK_CONTEXT;
static NTSTATUS STDCALL static NTSTATUS NTAPI
QueryRegistryCallback( QueryRegistryCallback(
IN PWSTR ValueName, IN PWSTR ValueName,
IN ULONG ValueType, IN ULONG ValueType,
@ -732,7 +755,7 @@ QueryRegistryCallback(
* @unimplemented * @unimplemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortGetRegistryParameters( VideoPortGetRegistryParameters(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PWSTR ParameterName, IN PWSTR ParameterName,
@ -780,7 +803,7 @@ VideoPortGetRegistryParameters(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortSetRegistryParameters( VideoPortSetRegistryParameters(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PWSTR ValueName, IN PWSTR ValueName,
@ -802,7 +825,7 @@ VideoPortSetRegistryParameters(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortGetVgaStatus( VideoPortGetVgaStatus(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
OUT PULONG VgaStatus) OUT PULONG VgaStatus)
@ -830,7 +853,7 @@ VideoPortGetVgaStatus(
* @implemented * @implemented
*/ */
PVOID STDCALL PVOID NTAPI
VideoPortGetRomImage( VideoPortGetRomImage(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Unused1, IN PVOID Unused1,
@ -888,7 +911,7 @@ VideoPortGetRomImage(
* @implemented * @implemented
*/ */
BOOLEAN STDCALL BOOLEAN NTAPI
VideoPortScanRom( VideoPortScanRom(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PUCHAR RomBase, IN PUCHAR RomBase,
@ -922,7 +945,7 @@ VideoPortScanRom(
* @implemented * @implemented
*/ */
BOOLEAN STDCALL BOOLEAN NTAPI
VideoPortSynchronizeExecution( VideoPortSynchronizeExecution(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN VIDEO_SYNCHRONIZE_PRIORITY Priority, IN VIDEO_SYNCHRONIZE_PRIORITY Priority,
@ -972,7 +995,7 @@ VideoPortSynchronizeExecution(
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortEnumerateChildren( VideoPortEnumerateChildren(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Reserved) IN PVOID Reserved)
@ -1060,7 +1083,7 @@ VideoPortEnumerateChildren(
* @unimplemented * @unimplemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortCreateSecondaryDisplay( VideoPortCreateSecondaryDisplay(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN OUT PVOID *SecondaryDeviceExtension, IN OUT PVOID *SecondaryDeviceExtension,
@ -1074,7 +1097,7 @@ VideoPortCreateSecondaryDisplay(
* @implemented * @implemented
*/ */
BOOLEAN STDCALL BOOLEAN NTAPI
VideoPortQueueDpc( VideoPortQueueDpc(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PMINIPORT_DPC_ROUTINE CallbackRoutine,
@ -1090,7 +1113,7 @@ VideoPortQueueDpc(
* @unimplemented * @unimplemented
*/ */
PVOID STDCALL PVOID NTAPI
VideoPortGetAssociatedDeviceExtension(IN PVOID DeviceObject) VideoPortGetAssociatedDeviceExtension(IN PVOID DeviceObject)
{ {
DPRINT1("VideoPortGetAssociatedDeviceExtension: Unimplemented.\n"); DPRINT1("VideoPortGetAssociatedDeviceExtension: Unimplemented.\n");
@ -1101,7 +1124,7 @@ VideoPortGetAssociatedDeviceExtension(IN PVOID DeviceObject)
* @implemented * @implemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortGetVersion( VideoPortGetVersion(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN OUT PVPOSVERSIONINFO VpOsVersionInfo) IN OUT PVPOSVERSIONINFO VpOsVersionInfo)
@ -1139,7 +1162,7 @@ VideoPortGetVersion(
* @unimplemented * @unimplemented
*/ */
BOOLEAN STDCALL BOOLEAN NTAPI
VideoPortCheckForDeviceExistence( VideoPortCheckForDeviceExistence(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN USHORT VendorId, IN USHORT VendorId,
@ -1157,7 +1180,7 @@ VideoPortCheckForDeviceExistence(
* @unimplemented * @unimplemented
*/ */
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortRegisterBugcheckCallback( VideoPortRegisterBugcheckCallback(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN ULONG BugcheckCode, IN ULONG BugcheckCode,
@ -1172,7 +1195,7 @@ VideoPortRegisterBugcheckCallback(
* @implemented * @implemented
*/ */
LONGLONG STDCALL LONGLONG NTAPI
VideoPortQueryPerformanceCounter( VideoPortQueryPerformanceCounter(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
OUT PLONGLONG PerformanceFrequency OPTIONAL) OUT PLONGLONG PerformanceFrequency OPTIONAL)
@ -1188,7 +1211,7 @@ VideoPortQueryPerformanceCounter(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortAcquireDeviceLock( VideoPortAcquireDeviceLock(
IN PVOID HwDeviceExtension) IN PVOID HwDeviceExtension)
{ {
@ -1207,7 +1230,7 @@ VideoPortAcquireDeviceLock(
* @implemented * @implemented
*/ */
VOID STDCALL VOID NTAPI
VideoPortReleaseDeviceLock( VideoPortReleaseDeviceLock(
IN PVOID HwDeviceExtension) IN PVOID HwDeviceExtension)
{ {
@ -1225,7 +1248,7 @@ VideoPortReleaseDeviceLock(
* @unimplemented * @unimplemented
*/ */
VOID STDCALL VOID NTAPI
VpNotifyEaData( VpNotifyEaData(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PVOID Data) IN PVOID Data)

View file

@ -106,61 +106,61 @@ typedef struct _VIDEO_PORT_DEVICE_EXTENSTION
/* agp.c */ /* agp.c */
NTSTATUS STDCALL NTSTATUS NTAPI
IntAgpGetInterface( IntAgpGetInterface(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN OUT PINTERFACE Interface); IN OUT PINTERFACE Interface);
/* dispatch.c */ /* dispatch.c */
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortAddDevice( IntVideoPortAddDevice(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject); IN PDEVICE_OBJECT PhysicalDeviceObject);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchOpen( IntVideoPortDispatchOpen(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp); IN PIRP Irp);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchClose( IntVideoPortDispatchClose(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp); IN PIRP Irp);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchCleanup( IntVideoPortDispatchCleanup(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp); IN PIRP Irp);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchDeviceControl( IntVideoPortDispatchDeviceControl(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp); IN PIRP Irp);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchPnp( IntVideoPortDispatchPnp(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp); IN PIRP Irp);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortDispatchPower( IntVideoPortDispatchPower(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp); IN PIRP Irp);
VOID STDCALL VOID NTAPI
IntVideoPortUnload(PDRIVER_OBJECT DriverObject); IntVideoPortUnload(PDRIVER_OBJECT DriverObject);
/* timer.c */ /* timer.c */
BOOLEAN STDCALL BOOLEAN NTAPI
IntVideoPortSetupTimer( IntVideoPortSetupTimer(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension); IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension);
/* interrupt.c */ /* interrupt.c */
BOOLEAN STDCALL BOOLEAN NTAPI
IntVideoPortSetupInterrupt( IntVideoPortSetupInterrupt(
IN PDEVICE_OBJECT DeviceObject, IN PDEVICE_OBJECT DeviceObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
@ -168,7 +168,7 @@ IntVideoPortSetupInterrupt(
/* resource.c */ /* resource.c */
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortMapPhysicalMemory( IntVideoPortMapPhysicalMemory(
IN HANDLE Process, IN HANDLE Process,
IN PHYSICAL_ADDRESS PhysicalAddress, IN PHYSICAL_ADDRESS PhysicalAddress,
@ -181,12 +181,12 @@ IntVideoPortMapPhysicalMemory(
extern ULONG CsrssInitialized; extern ULONG CsrssInitialized;
extern PKPROCESS Csrss; extern PKPROCESS Csrss;
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortEnumerateChildren( VideoPortEnumerateChildren(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVOID Reserved); IN PVOID Reserved);
PVOID STDCALL PVOID NTAPI
VideoPortGetProcAddress( VideoPortGetProcAddress(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PUCHAR FunctionName); IN PUCHAR FunctionName);
@ -197,14 +197,14 @@ IntAttachToCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState);
VOID FASTCALL VOID FASTCALL
IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState); IntDetachFromCSRSS(PKPROCESS *CallingProcess, PKAPC_STATE ApcState);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortCreateAdapterDeviceObject( IntVideoPortCreateAdapterDeviceObject(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL, IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
OUT PDEVICE_OBJECT *DeviceObject OPTIONAL); OUT PDEVICE_OBJECT *DeviceObject OPTIONAL);
NTSTATUS STDCALL NTSTATUS NTAPI
IntVideoPortFindAdapter( IntVideoPortFindAdapter(
IN PDRIVER_OBJECT DriverObject, IN PDRIVER_OBJECT DriverObject,
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension,
@ -212,20 +212,20 @@ IntVideoPortFindAdapter(
/* int10.c */ /* int10.c */
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10AllocateBuffer( IntInt10AllocateBuffer(
IN PVOID Context, IN PVOID Context,
OUT PUSHORT Seg, OUT PUSHORT Seg,
OUT PUSHORT Off, OUT PUSHORT Off,
IN OUT PULONG Length); IN OUT PULONG Length);
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10FreeBuffer( IntInt10FreeBuffer(
IN PVOID Context, IN PVOID Context,
IN USHORT Seg, IN USHORT Seg,
IN USHORT Off); IN USHORT Off);
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10ReadMemory( IntInt10ReadMemory(
IN PVOID Context, IN PVOID Context,
IN USHORT Seg, IN USHORT Seg,
@ -233,7 +233,7 @@ IntInt10ReadMemory(
OUT PVOID Buffer, OUT PVOID Buffer,
IN ULONG Length); IN ULONG Length);
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10WriteMemory( IntInt10WriteMemory(
IN PVOID Context, IN PVOID Context,
IN USHORT Seg, IN USHORT Seg,
@ -241,12 +241,12 @@ IntInt10WriteMemory(
IN PVOID Buffer, IN PVOID Buffer,
IN ULONG Length); IN ULONG Length);
VP_STATUS STDCALL VP_STATUS NTAPI
IntInt10CallBios( IntInt10CallBios(
IN PVOID Context, IN PVOID Context,
IN OUT PINT10_BIOS_ARGUMENTS BiosArguments); IN OUT PINT10_BIOS_ARGUMENTS BiosArguments);
VP_STATUS STDCALL VP_STATUS NTAPI
VideoPortInt10( VideoPortInt10(
IN PVOID HwDeviceExtension, IN PVOID HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments); IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments);