BOOLEAN
VC_SynchronizeDPC(
PDEVICE_INFO pDevInfo,
PSYNC_ROUTINE pSync,
PVOID pContext
);
The VC_SynchronizeDPC function synchronizes access to objects that are referenced by a kernel-mode video capture driver’s CaptureService function.
BOOLEAN pSync(PVOID pContext);
Returns the callback function’s return value.
A driver’s CaptureService function executes at an IRQL of DISPATCH_LEVEL. If other code within the driver must access the same objects (frame buffers, data structures, and so on) that the CaptureService function references, then all code that references the objects, including the code within CaptureService, must be synchronized by using VC_SynchronizeDPC.
To use VC_SynchronizeDPC, place each piece of code that references the objects to be protected into a callback function. Specify each callback function as a pSync parameter to a VC_SynchronizeDPC call. Typically, you use the pContext parameter to indicate the objects to be referenced.
The VC_SynchronizeDPC function acquires a spin lock and executes the callback function at an IRQL of DISPATCH_LEVEL. If you access an object only within code that is included in VC_SynchronizeDPC callbacks, then other processors cannot simultaneously access the object, and lower-priority code on the current processor cannot obtain access.
Code that calls VC_SynchronizeDPC must be executing at an IRQL of DISPATCH_LEVEL or lower.