PCAM_INITIALIZE_ROUTINE callback function (usbcamdi.h)

A camera minidriver's callback function initializes the device or performs any minidriver-specific clean-up that is required.

Syntax

PCAM_INITIALIZE_ROUTINE PcamInitializeRoutine;

NTSTATUS PcamInitializeRoutine(
  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

CamInitialize returns STATUS_SUCCESS or an appropriate error code.

Remarks

About CamInitialize

USBCAMD calls the camera minidriver's CamInitialize callback function the first time the device is used.

CamInitialize is called by both the original USBCAMD and USBCAMD2.

This function is required.

About CamUnInitialize

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

Requirement Value
Target Platform Desktop
Header usbcamdi.h (include Usbcamdi.h)