Because your driver handles the drawing of video, the client-application does not need to determine the output format. The client-application needs to know only if your driver can handle the input format. It sends ICM_DRAW_QUERY to determine if your driver supports the input format. The input format is specified with a pointer to a BITMAPINFO data structure in dwParam1. The dwParam2 parameter is not used.
If your driver supports the specified input format, return ICERR_OK to indicate the driver accepts the formats. If your driver does not support the format, return ICERR_BADFORMAT.
Your driver might also receive the ICM_DRAW_SUGGESTFORMAT message. Typically, this message is sent by the decompression portion of the driver to the drawing portion of the driver to obtain the best decompressed format for the data when the drawing portion can handle several formats. The dwParam1 parameter of ICM_DRAW_SUGGESTFORMAT points to a ICDRAWSUGGEST structure and the dwParam2 parameter specifies its size.
If returning format information, return ICERR_OK. If the lpbiSuggest member is NULL, return the amount of memory required for the suggested output format structure.