The DVM_STREAM_ALLOCBUFFER message requests a user-mode video capture driver to allocate a buffer from a device’s local, non-system memory.
The driver should return DV_ERR_OK if the operation succeeds. Otherwise, it should return one of the DV_ERR error codes defined in msvideo.h. Custom error codes are also allowed (see DVM_GETERRORTEXT).
A client sends the DVM_STREAM_ALLOCBUFFER message by calling the driver’s DriverProc entry point, passing the specified parameter values. Applications can send this message by calling the videoMessage function, which is described in the Video for Windows Development Kit.
If the hardware provides on-board memory that can be used as buffer space to receive captured video data, the driver should allocate a buffer using the size specified by lParam2, return the buffer’s address in the location pointed to by lParam1, and provide a return value of DV_ERR_OK. If no buffer space is available, the driver should return NULL in the location pointed to by lParam1. If the hardware does not provide on-board memory, the driver should return DV_ERR_NOTSUPPORTED.
Note: The video capture driver libraries, VCUser.lib and VCKernel.lib, do not support this message. Therefore, the sample video capture drivers do not support the message either.