Hi it's me again.
I found another function i want to use but i don't exactly know how to work with. I want to use the CVI Callback EndOfStream. I found this explanation which i don't not understand. Can somebody give some example code or something like that? Thank You (I'm using LabWindow/CVI 6.0).
/**************************************************************/
/** Function: WMPLib__WMPOCXEventsRegOnEndOfStream **/
/**************************************************************/
Call this function to register a callback for the EndOfStream event of the _WMPOCXEvents event class. When you register the callback, you must specify the CAObjHandle of the server object from which you want to receive events. The following server objects generate _WMPOCXEvents events: IWMPCdromCollection, IWMPClosedCaption, IWMPClosedCaption2, IWMPControls, IWMPControls2, IWMPControls3, IWMPDVD, IWMPError, IWMPErrorItem, IWMPErrorItem2, IWMPMedia, IWMPMedia2, IWMPMedia3, IWMPMediaCollection, IWMPMetadataPicture, IWMPMetadataText, IWMPPlayer, IWMPPlayer2, IWMPPlayer3, IWMPPlayer4, IWMPPlaylist, IWMPPlaylistCollection, IWMPSettings, IWMPSettings2.
The callback function that you specify must have the following prototype:
HRESULT CVICALLBACK Callback (CAObjHandle caServerObjHandle, void *caCallbackData, long result);
Upon entry to the callback, the caServerObjHandle parameter identifies the object that is firing the event. You can obtain the panel and control ID for the ActiveX control or document object firing the event by calling GetPanelAndCtrlIdFromObjHandle. The caCallbackData parameter contains the value you passed in the Callback Data parameter of this function. The other parameters are event-specific and are specified and (optionally) documented by the server.
/*-------------------- Prototype ---------------------*/
HRESULT WMPLib__WMPOCXEventsRegOnEndOfStream (CAObjHandle Server_Object, _WMPOCXEventsRegOnEndOfStream_CallbackType Callback_Function,
void *Callback_Data, int Enable_Callbacks, int *Callback_Id);