Hooking the Callback Function into the Playback

Use the mmpSetFrameHook function to hook your callback function into the playback. This function returns TRUE if successful. It has the following syntax:

BOOL mmpSetFrameHook(idMovie, lpFrameHook)

Pass the movie ID of the Movie Player instance to idMovie and a FARPROC pointer containing the procedure-instance address of the callback function to lpFrameHook.

To remove the callback function from the playback, call mmpSetFrameHook to reset the callback function pointer to its original value (this might be NULL if no callback function was attached).

Note:

Don't free the procedure instance of the callback function before unhooking the callback function.