hello!
I want to use flash activeX control in my cvi program to decorate my program surface.
I have seen a example in NI resource.But it can't satisfy my need.It just show how to load and play a flash movie in a flash control.I want to use the flash to realize a control function.Flash activeX provide a function to realize the communication between the flash activeX control and flash caller. It is "fscommand",a flash actionscript languish command.
In cvi programm,
"HRESULT ShockwaveFlashObjects__IShockwaveFlashEventsRegOnFSCommand(CAObjHandle Server_Object,
_IShockwaveFlashEventsRegOnFSCommand_CallbackType Callback_Function, void *Callback_Data,int Enable_Callbacks, int *Callback_Id);"
the function prototype above have been provide in cvi help document.
I write them out below:
"Call this function to register a callback for the FSCommand event of the _IShockwaveFlashEvents 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 _IShockwaveFlashEvents events: IShockwaveFlash.
The callback function that you specify must have the following prototype:
HRESULT CVICALLBACK Callback (CAObjHandle caServerObjHandle,
void *caCallbackData,
char *command,
char *args);
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 GetActiveXCtrlFromObjHandle. 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. The return value is currently unused. You should always return S_OK.
/*-------------------- Prototype ---------------------*/
HRESULT ShockwaveFlashObjects__IShockwaveFlashEventsRegOnFSCommand
(CAObjHandle Server_Object,
_IShockwaveFlashEventsRegOnFSCommand_CallbackType
Callback_Function, void *Callback_Data,
int Enable_Callbacks, int *Callback_Id); "
I just want to know how to use ShockwaveFlashObjects__IShockwaveFlashEventsRegOnFSCommand() function to register
"HRESULT CVICALLBACK Callback (CAObjHandle caServerObjHandle,void *caCallbackData, char *command,char *args);"
I have try several times.Errors always occur.So I turn help to you!Could you write a simple example for me?just realize the basic funciton call ,the registation and callback function usage.
Thank you!!!