Share via


CamUnInitialize routine

A camera minidriver's CamUnInitialize callback function performs any minidriver-specific clean-up that is required.

Syntax

PCAM_INITIALIZE_ROUTINE CamUnInitialize;

NTSTATUS CamUnInitialize(
   PDEVICE_OBJECT BusDeviceObject,
   PVOID          DeviceContext
)
{ ... }

Parameters

  • BusDeviceObject
    Pointer to the camera minidriver's device object created by the USB hub.

  • DeviceContext
    Pointer to the camera minidriver's device context.

Return value

CamUnInitialize returns STATUS_SUCCESS or an appropriate error code.

Remarks

USBCAMD calls the camera minidriver's CamUnInitialize callback function while processing an SRB_UNINITIALIZE_DEVICE request. The CamUnInitialize function in version 1.0 is invoked after the user no longer requires the peripheral for that session.

Whereas the stream class driver automatically resets values associated with the minidriver, this call allows the minidriver to deallocate any specific resources used during its operation, such as memory used to store processed and decoded video frames.

CamUnInitialize is called by both versions 1.0 and 2.0 of USBCAMD.

This function is required.

Requirements

Target platform

Desktop

Header

Usbcamdi.h (include Usbcamdi.h)

See also

SRB_UNINITIALIZE_DEVICE

 

 

Send comments about this topic to Microsoft