/* ******************************************************************* * Function: CKERROR CreateCISIteratorBBProto( CKBehaviorPrototype** behaviorPrototypePtr ) * * Description : The prototype creation function will be called the first time * a behavior must be created to create the CKBehaviorPrototype * that contains the description of the behavior. * * Parameters : * behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that * describes the behavior's internal structure * and relationships with other objects. * * Returns : CKERROR * ******************************************************************* */ CKERROR CreateCISIteratorBBProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype(GBL_CI_API_ENTRY("CISIterator")); if(!proto) return CKERR_OUTOFMEMORY; proto->DeclareInput("On/Reset"); proto->DeclareOutput("Exit On/Reset"); proto->DeclareInput("Loop In"); proto->DeclareOutput("Loop Out"); proto->DeclareOutParameter("value", CKPGUID_STRING,"-1"); proto->DeclareOutParameter("default value", CKPGUID_STRING,"-1"); proto->DeclareOutParameter("unique name", CKPGUID_STRING,""); proto->DeclareOutParameter("description", CKPGUID_STRING,"-1"); proto->DeclareOutParameter("access flags", CIPRTFLAGSGUID,""); proto->DeclareOutParameter("parameter type", CKPGUID_PARAMETERTYPE,"-1"); proto->DeclareOutParameter("ci db index", CKPGUID_INT,"-1"); proto->DeclareLocalParameter(NULL, CKPGUID_INT); // index proto->DeclareLocalParameter(NULL, CKPGUID_INT); // cis size proto->DeclareLocalParameter(NULL, CKPGUID_POINTER); // ciid list proto->DeclareSetting("Read From Database", CKPGUID_BOOL,"FALSE"); proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); proto->SetBehaviorCallbackFct(CISIteratorCB); proto->SetFunction(CISIteratorBB); *pproto = proto; return CK_OK; }
CKERROR CreateTextureSinusProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Texture Sine2"); proto->DeclareInput("In"); proto->DeclareOutput("Out"); proto->DeclareInParameter("X Amplitude", CKPGUID_FLOAT,"0.1" ); proto->DeclareInParameter("Y Amplitude", CKPGUID_FLOAT ,"0.1"); proto->DeclareInParameter("Velocity", CKPGUID_FLOAT ,"1"); proto->DeclareInParameter("Channel", CKPGUID_INT, "-1"); proto->DeclareInParameter("target", CKPGUID_MESH, "-1"); proto->DeclareLocalParameter(NULL, CKPGUID_VOIDBUF ); // Data proto->DeclareLocalParameter(NULL, CKPGUID_FLOAT, "0.0" ); // Time proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); proto->SetFunction(TextureSinus); proto->SetBehaviorCallbackFct(TextureSinusCallBackObject); *pproto = proto; return CK_OK; }
//************************************ // Method: CreatePMaterialIteratorProto // FullName: CreatePMaterialIteratorProto // Access: public // Returns: CKERROR // Qualifier: // Parameter: CKBehaviorPrototype **pproto //************************************ CKERROR CreatePMaterialIteratorProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PMaterialIterator"); if(!proto) return CKERR_OUTOFMEMORY; proto->DeclareInput("In"); proto->DeclareInput("Next"); proto->DeclareOutput("Finish"); proto->DeclareOutput("Loop"); proto->DeclareLocalParameter("current result", CKPGUID_POINTER, "0"); proto->DeclareOutParameter("Index",CKPGUID_INT); proto->DeclareOutParameter("XML Link",VTE_XML_MATERIAL_TYPE); proto->DeclareOutParameter("Name",CKPGUID_STRING); proto->DeclareOutParameter("Dynamic Friction",CKPGUID_FLOAT); proto->DeclareOutParameter("Static Friction",CKPGUID_FLOAT); proto->DeclareOutParameter("Restitution",CKPGUID_FLOAT); proto->DeclareOutParameter("Dynamic Friction V",CKPGUID_FLOAT); proto->DeclareOutParameter("Static Friction V",CKPGUID_FLOAT); proto->DeclareOutParameter("Direction of Anisotropy ",CKPGUID_VECTOR); proto->DeclareOutParameter("Friction Combine Mode",VTE_MATERIAL_COMBINE_MODE); proto->DeclareOutParameter("Restitution Combine Mode",VTE_MATERIAL_COMBINE_MODE); proto->DeclareOutParameter("Flags",VTF_MATERIAL_FLAGS); proto->DeclareOutParameter("Result",VTS_MATERIAL); proto->SetBehaviorCallbackFct( PMaterialIteratorCB ); proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE); proto->SetFunction(PMaterialIterator); *pproto = proto; return CK_OK; }
CKERROR CreateMidiEventBehaviorProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Midi Event"); if(!proto) return CKERR_OUTOFMEMORY; proto->DeclareInput("On"); proto->DeclareInput("Off"); proto->DeclareOutput("Activated"); proto->DeclareOutput("Deactivated"); proto->DeclareInParameter("Channel", CKPGUID_INT, "0"); proto->DeclareInParameter("Note 1", CKPGUID_INT, "0"); proto->DeclareLocalParameter(NULL, CKPGUID_BOOL, "FALSE"); // Combination was ok proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); proto->SetFunction(MidiEvent); proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)(CKBEHAVIOR_VARIABLEPARAMETERINPUTS)); proto->SetBehaviorCallbackFct( MidiEventCallBack ); *pproto = proto; return CK_OK; }
CKERROR CreatePacketIteratorProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype(GBL_CI_API_ENTRY("PacketIterator")); if(!proto) return CKERR_OUTOFMEMORY; proto->DeclareInput("On/Reset"); proto->DeclareOutput("Exit On/Reset"); proto->DeclareInput("Loop In"); proto->DeclareOutput("Loop Out"); proto->DeclareOutParameter("Target user id", CKPGUID_INT,"-1"); proto->DeclareOutParameter("Data", CKPGUID_STRING,""); proto->DeclareOutParameter("Header", CKPGUID_STRING,""); proto->DeclareOutParameter("PacketType", GUID_GBLCI_EPACKET_TYPE,""); proto->DeclareOutParameter("Time Stamp", CKPGUID_INT,"-1"); proto->DeclareLocalParameter(NULL, CKPGUID_INT); // packet index if(!GBLDebugBuild) { proto->SetFlags(CK_BEHAVIORPROTOTYPE_HIDDEN); }else { proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); } proto->SetFunction(PacketIterator); *pproto = proto; return CK_OK; }
/* ******************************************************************* * Function: CKERROR CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr ) * * Description : The prototype creation function will be called the first time * a behavior must be created to create the CKBehaviorPrototype * that contains the description of the behavior. * * Parameters : * behaviorPrototypePtr Pointer to a CKBehaviorPrototype object that * describes the behavior's internal structure * and relationships with other objects. * * Returns : CKERROR * ******************************************************************* */ CKERROR GBLCOBGWrapper::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr ) { #if GBL_RUNTIME // Not editable from Virtools Dev CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototypeRunTime( "GBLCOBGWrapper" ); #elif GBL_GAMEDEVELOPER // Edition depend on the BB. CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCOBGWrapper" ); #else // Editable from Virtools Dev CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCOBGWrapper" ); #endif if ( !behaviorPrototype ) return CKERR_OUTOFMEMORY; //---- Local Parameters Declaration behaviorPrototype->DeclareLocalParameter("BG Script", CKPGUID_BEHAVIOR ); //---- Settings Declaration behaviorPrototype->DeclareSetting("BG filename", CKPGUID_STRING ,"path undefined.(BGWrapper Settings)"); behaviorPrototype->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); behaviorPrototype->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)(CKBEHAVIOR_INTERNALLYCREATEDINPUTS | CKBEHAVIOR_INTERNALLYCREATEDINPUTPARAMS | CKBEHAVIOR_INTERNALLYCREATEDOUTPUTS | CKBEHAVIOR_INTERNALLYCREATEDOUTPUTPARAMS)); behaviorPrototype->SetBehaviorCallbackFct(BGWrapperCB, CKCB_BEHAVIORLOAD | CKCB_BEHAVIORRESET | CKCB_BEHAVIORSETTINGSEDITED | CKCB_BEHAVIORDETACH | CKCB_BEHAVIORDEACTIVATESCRIPT , NULL); behaviorPrototype->SetFunction( GBLCOBGWrapper::BehaviourFunction ); *behaviorPrototypePtr = behaviorPrototype; return CK_OK; }
/* ******************************************************************* * Function: CreateBehaviourPrototype() * * Description : Declares the BB's inputs and outputs * * Parameters : * ppProto, w: Passed in from Virtools * * Returns : CKERROR - Standard virtools return type * ******************************************************************* */ CKERROR CGBLListBox::CreateBehaviourPrototype(CKBehaviorPrototype** ppProto) { CKERROR err = CK_OK; // Call base class to create instance of CKBehaviorPrototype and // also declare the widget base inputs, outputs and flags CKBehaviorPrototype *pProto = CGBLWidget::CreateBaseBehaviourPrototype("GBLListBox"); if (!pProto) { err = CKERR_OUTOFMEMORY; } else { // Beh inputs: if (eBehInputFocus != pProto->DeclareInput("Focus")) assert(NULL); if (eBehInputSelect != pProto->DeclareInput("Select")) assert(NULL); // Beh outputs: if (eBehOutputNewSelection != pProto->DeclareOutput("New Selection")) assert(NULL); // Parameter inputs: if (eParamInputMaterial != pProto->DeclareInParameter("Material", CKPGUID_MATERIAL)) assert(NULL); if (eParamInputStringListArray != pProto->DeclareInParameter("String List Array", CKPGUID_DATAARRAY)) assert(NULL); if (eParamInputColumnsArray != pProto->DeclareInParameter("Columns Array", CKPGUID_DATAARRAY)) assert(NULL); if (eParamInputFocusItem != pProto->DeclareInParameter("Focus Item", CKPGUID_INT)) assert(NULL); if (eParamInputSelectedItem != pProto->DeclareInParameter("Selected Item", CKPGUID_INT)) assert(NULL); // Param outputs: if (eParamOutputSelectedItem != pProto->DeclareOutParameter("Selected Item", CKPGUID_INT)) assert(NULL); // Local params: if (eLocalParamFocussedItem != pProto->DeclareLocalParameter("Focussed Item", CKPGUID_INT, "0")) assert(NULL); if (eLocalParamSelectionType != pProto->DeclareSetting("Selection Type", CKGUID_GBLLISTBOXSELECTIONTYPE, "1")) assert(NULL); if (eLocalParamIsScrollDownButtonPressed != pProto->DeclareLocalParameter("Scroll Down Button Pressed", CKPGUID_BOOL, "0")) assert(NULL); if (eLocalParamIsScrollUpButtonPressed != pProto->DeclareLocalParameter("Scroll Up Button Pressed", CKPGUID_BOOL, "0")) assert(NULL); if (eLocalParamScrollOffset != pProto->DeclareLocalParameter("Scroll Offset", CKPGUID_INT, "0")) assert(NULL); if (eLocalParamScrollMouseDirection != pProto->DeclareLocalParameter("Scroll Mouse Direction", CKPGUID_INT, "0")) assert(NULL); if (eLocalParamScrollKeyboardDirection != pProto->DeclareLocalParameter("Scroll Keyboard Direction", CKPGUID_INT, "0")) assert(NULL); if (eLocalParamScrollTimeDelta != pProto->DeclareLocalParameter("Scroll Time Delta", CKPGUID_INT, "0")) assert(NULL); CKCHAR defaultDelay[256]; ::sprintf(defaultDelay, "%d", CGBLWidgetsTheme::GetInitialScrollDelay()); if (eLocalParamScrollDelay != pProto->DeclareLocalParameter("Scroll Delay", CKPGUID_INT, defaultDelay)) assert(NULL); // Set the behaviour function pProto->SetFunction(BehaviourFunction); // Everything must have gone OK, pass back Proto pointer to Virtools *ppProto = pProto; } return err; }
CKERROR CreatePWOverlapSphereProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PWOverlapSphere"); if(!proto) return CKERR_OUTOFMEMORY; /*! \page PWOverlapSphere PWOverlapSphere is categorized in \ref Collision <h3>Description</h3> Apply to a <A HREF="Documentation.chm::/beobjects/1_ck3dentity.html">3DEntity</A><br> Performs an overlap test against masked shape groups.Outputs an object only.<br> See <A HREF="PWOverlaps.cmo">PWOverlaps.cmo</A> for example. <h3>Technical Information</h3> \image html PWOverlapSphere.png <SPAN CLASS="in">In: </SPAN>triggers the process <BR> <SPAN CLASS="in">Next: </SPAN>Next Hit. <BR> <SPAN CLASS="in">Next: </SPAN>Iterate through next hit. <BR> <SPAN CLASS="out">Yes: </SPAN>Hit occured. <BR> <SPAN CLASS="out">No: </SPAN>No hits. <BR> <SPAN CLASS="out">Finish: </SPAN>Last hit. <BR> <SPAN CLASS="out">Next: </SPAN>Loop out. <BR> <SPAN CLASS="pin">Target: </SPAN>World Reference. pDefaultWorld! <BR> <SPAN CLASS="pin">Radius: </SPAN>The sphere radius. <BR> <SPAN CLASS="pin">Center: </SPAN>The spheres center in world space.If shape reference is given, then its transforming this value in its local space. <BR> <SPAN CLASS="pin">Shapes Types: </SPAN>Adds static and/or dynamic shapes to the test. <BR> <SPAN CLASS="pin">Accurate: </SPAN>True to test the sphere against the actual shapes, false to test against the AABBs only. <BR> <SPAN CLASS="pin">Groups: </SPAN>Includes specific groups to the test. <BR> <SPAN CLASS="pin">Groups Mask: </SPAN>Alternative mask used to filter shapes. See #pRigidBody::setGroupsMask <BR> <br> <h3>Note</h3><br> <br> <br> Is utilizing #pWorld::overlapSphereShapes()<br> */ proto->DeclareInput("In"); proto->DeclareInput("Next"); proto->DeclareOutput("Yes"); proto->DeclareOutput("No"); proto->DeclareOutput("Finish"); proto->DeclareOutput("Next"); proto->DeclareInParameter("Radius",CKPGUID_FLOAT); proto->DeclareInParameter("Center",CKPGUID_VECTOR); proto->DeclareInParameter("Shape Reference",CKPGUID_3DENTITY); proto->DeclareInParameter("Shapes Type",VTF_SHAPES_TYPE); proto->DeclareInParameter("Accurate",CKPGUID_BOOL); proto->DeclareInParameter("Groups",CKPGUID_INT); proto->DeclareInParameter("Filter Mask",VTS_FILTER_GROUPS); proto->DeclareLocalParameter("result", CKPGUID_GROUP); proto->DeclareLocalParameter("index", CKPGUID_INT); proto->DeclareLocalParameter("size", CKPGUID_INT); proto->DeclareSetting("Groups",CKPGUID_BOOL,"false"); proto->DeclareSetting("Groups Mask",CKPGUID_BOOL,"false"); proto->DeclareOutParameter("Touched Body",CKPGUID_3DENTITY); //proto->DeclareSetting("Trigger on Enter",CKPGUID_BOOL,"FALSE"); proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE); proto->SetBehaviorCallbackFct( PWOverlapSphereCB ); proto->SetFunction(PWOverlapSphere); *pproto = proto; return CK_OK; }
//************************************ // Method: CreatePCGroupTriggerEventProto // FullName: CreatePCGroupTriggerEventProto // Access: public // Returns: CKERROR // Qualifier: // Parameter: CKBehaviorPrototype **pproto //************************************ CKERROR CreatePCGroupTriggerEventProto(CKBehaviorPrototype **pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PCGroupTriggerEvent"); if(!proto) return CKERR_OUTOFMEMORY; /*! \page PCGroupTriggerEvent PCGroupTriggerEvent is categorized in \ref Collision <h3>Description</h3> Apply to a <A HREF="Documentation.chm::/beobjects/1_ck3dentity.html">3DEntity</A><br> Triggers outputs if the body enters,stays or leaves another body .<br> See <A HREF="pBTriggerEvent.cmo">pBTriggerEvent.cmo</A> for example. <h3>Technical Information</h3> \image html PCGroupTriggerEvent.png <SPAN CLASS="in">In: </SPAN>triggers the process <BR> <SPAN CLASS="out">No Event: </SPAN>Nothing touched. <BR> <SPAN CLASS="out">Entering: </SPAN>Body entered. <BR> <SPAN CLASS="out">Leaving: </SPAN>Body leaved. <BR> <SPAN CLASS="out">Stay: </SPAN>Inside body . <BR> <SPAN CLASS="pin">Target Group: </SPAN>The group which the bb outputs triggers for. <BR> <SPAN CLASS="pout">Touched Object: </SPAN>The touched body. <BR> <h3>Warning</h3> The body must be dynamic. <br> <br> <h3>Note</h3><br> <br> <br> Is utilizing #pRigidBody #pWorld #PhysicManager #pRigidBody::addForce().<br> */ //proto->DeclareInParameter("Extra Filter",VTF_TRIGGER,"0"); //proto->DeclareInParameter("Remove Event",CKPGUID_BOOL,"0"); proto->DeclareInput("In"); proto->DeclareInput("Next"); proto->DeclareOutput("No Event"); proto->DeclareOutput("Entering"); proto->DeclareOutput("Stay"); proto->DeclareOutput("Leaving"); proto->DeclareOutput("Has More"); proto->DeclareOutParameter("Trigger Object",CKPGUID_3DENTITY,0); proto->DeclareOutParameter("Touched Object",CKPGUID_3DENTITY,0); proto->DeclareOutParameter("Trigger Event",VTF_TRIGGER,0); proto->DeclareLocalParameter("currentIndex", CKPGUID_INT); //proto->DeclareSetting("Trigger on Enter",CKPGUID_BOOL,"FALSE"); proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL); proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE); proto->SetFunction(PCGroupTriggerEvent); *pproto = proto; return CK_OK; }
/* ******************************************************************* * Function: CKERROR CreateBehaviourPrototype( CKBehaviorPrototype** behaviorPrototypePtr ) * * Description : The prototype creation function will be called the first time * a behavior must be created to create the CKBehaviorPrototype * that contains the description of the behavior. * * Paramters : * behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that * describes the behavior's internal structure * and relationships with other objects. * * Returns : CKERROR * ******************************************************************* */ CKERROR CGBLBuildCommand::CreateBehaviourPrototype(CKBehaviorPrototype** pproto) { CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("GBLFCBuildCommand"); if (!proto) { return CKERR_OUTOFMEMORY; } //--- Inputs declaration /** * Starts building the command. Find required WaitForCommand BB, determine its * target (EGBLFCTarget) and attributes. */ proto->DeclareInput("BuildCommand"); /** * This input is activated if the Build Command BB operation is to be cancelled. * For example the Facilitator pressed 'Cancel' button stating that he doesn't * want to invoke the command anymore. The allocated data has to be released and * 'Cancelled' output activated. */ proto->DeclareInput("CancelOperation"); /** * The next parameter value has been passed in to the Build Command BB. For * example the Facilitator specified a value for prompted parameter and pressed * 'OK' button. */ proto->DeclareInput("ReadNextParameterValue"); //--- Outputs declaration /** * This output indicates that the build command has been cancelled. For example * the Facilitator pressed 'Cancel' button stating that he doesn't want to invoke * the command anymore. The allocated data had been released. */ proto->DeclareOutput("Cancelled"); /** * Indicate that a list of targets for the command is needed to be specified as an * array of Virtools user ID's and fed into SetDests parameter input of this * building block with ReadNextParameterValue input activated. The GBLTarget (that * specifies if the recipient is global, a team or a player) is specified as * GetGBLTarget parameter output. */ proto->DeclareOutput("ListRecipients"); /** * Additional parameter input is required for chosen command. For example a dialog * prompting for facilitator input could be displayed for the type and name * specified in parameter outputs. */ proto->DeclareOutput("GetNextParameterValue"); /** * If the value specified (by facilitator) is invalid (for example string instead * of integer), the input parameter has to be obtained again (possibly with * additional warning). */ proto->DeclareOutput("InvalidValue"); /** * States that the message target was a global element and it had been delivered * to local object (For it to have a global effect the object needs to be a * virtools distributed object or an alternative means of network synchronization * implemented by the designer). */ proto->DeclareOutput("HandleUntargetedCommand"); /** * States that the message target is a network element and is specified as an * array in parameter output. The command itself is encoded to a string and also * available as parameter output. */ proto->DeclareOutput("HandleTargetedCommand"); /** * States that and error occured. The build operation is cancelled */ proto->DeclareOutput("Error"); //--- Input Parameters declaration /** * Unique identifier of WaitForCommand building block. */ proto->DeclareInParameter("CommandID", CKPGUID_INT); /** * Parameter (argument) value returned as a string. For example from the parameter * input dialog. */ proto->DeclareInParameter("ParameterString", CKPGUID_STRING); /** * Set an array of target users IDs for SendNetworkMessage building block. */ proto->DeclareInParameter("Dests", CKPGUID_DATAARRAY); //--- Output Parameters declaration /** * Additional parameter input is required for chosen command with a specified type * given as a string. */ proto->DeclareOutParameter("ArgumentType", CKPGUID_STRING); /** * Additional parameter input is required for chosen command with a specified name * given as a string. */ proto->DeclareOutParameter("ArgumentName", CKPGUID_STRING); /** * Get an array of target users IDs for SendNetworkMessage building block. */ proto->DeclareOutParameter("Dests", CKPGUID_DATAARRAY); /** * Returns a string containing encoded command */ proto->DeclareOutParameter("CommandString", CKPGUID_STRING); /** * Type of recipient specified by the command (a team, a player or global) */ proto->DeclareOutParameter("Target", GUID_EGBLTARGET); /** * Output parameter that returns the designer specified list of acceptable * values for the argument that GBLBuildCommand BB requested for (by activating * GetNextArgument b-out). */ proto->DeclareOutParameter("DesignerSpecifiedList", CKPGUID_DATAARRAY); /** * Parameter output that returns the description for an error that occurred. */ proto->DeclareOutParameter("Error", GUID_TGBLERROR); /** * Current state of this BB */ gblBuildCommandStateLocalPos = proto->DeclareLocalParameter("gblBuildCommandState", CKPGUID_INT, "0"); /** * Position of iterator for target's outputs */ currentParameterPositionLocalPos = proto->DeclareLocalParameter("currentParameterPosition", CKPGUID_INT, "0"); /** * Target BB */ targetBBLocalPos = proto->DeclareLocalParameter("targetBB", CKPGUID_BEHAVIOR, "0"); /** * Command string */ commandStringLocalPos = proto->DeclareLocalParameter("commandString", CKPGUID_STRING); //---- Local Parameters Declaration //---- Settings Declaration proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)(CKBEHAVIOR_MESSAGESENDER)); proto->SetBehaviorCallbackFct(CallbackFunction, NULL, NULL); proto->SetFunction(BehaviourFunction); *pproto = proto; return CK_OK; }