The client-application sends ICM_DRAW each time it has an image to decompress. (Your driver should use this message to decompress images. It should wait for the ICM_DRAW_START message before it begins to render them.) The client-application uses the flags in the file index to ensure the first frame in a series of frames decompressed starts with a key frame boundary. Your driver must allocate the memory it needs for the decompressed image.
The ICDRAW data structure specified in dwParam1 contains the decompression parameters. The value specified in dwParam2 specifies the size of the structure.
The format of the input data is specified in a BITMAPINFOHEADER structure pointed to by lpFormat member. The input data is in a buffer specified by the lpData member. The number of bytes in the input buffer is specified by the cbData member.
The client-application sets the ICDRAW_HURRYUP flag in the dwFlags member when it wants your driver to try to decompress data at a faster rate. For example, the client-application might use this flag when the video is starting to lag behind the audio. If your driver cannot speed up its decompression and rendering performance, it might be necessary to avoid rendering a frame of data. The client-application sets the ICDRAW_UPDATE flag and sets lpData to NULL if it wants your driver to update the screen based on data previously received.
When your driver has finished decompressing the data, it returns ICERR_OK. After the driver returns from this message, the client-application deallocates or reuses the memory containing the format and image data. If your driver needs the format or image data for future use, it should copy the data it needs before it returns from the message.