BOOLEAN
VC_AccessData(
PDEVICE_INFO pDevInfo,
PUCHAR pData,
ULONG Length,
PACCESS_ROUTINE pAccessFunc,
PVOID pContext
);
The VC_AccessData function provides a means by which kernel-mode video capture drivers can be protected from encountering access violations when referencing user-mode data.
BOOLEAN AccessFunc (PDEVICE_INFO pDevInfo, PUCHAR pData, ULONG Length, PVOID pContext);
If the data specified by pData can be accessed, the function returns the value returned by the callback function. Otherwise the function returns FALSE.
The kernel-mode driver supplies the address of data to be accessed, along with the address of a callback function that performs an operation on the data, such as copying a bitmap into the frame buffer. The VC_AccessData function wraps the callback function in an exception handler so that if an access violation occurs, the kernel-mode driver can continue to execute. If an access violation occurs, the exception handler returns FALSE.
The function can only be called within the context of the user’s thread. It must not be called from the InterruptAcknowledge or CaptureService functions, because they execute within a system context.