Online documentation - WebsydianExpress v3.5 |
The callback functionality implemented by WebsydianExpress is based on the possibility to make dynamic calls based on registrations of callback functions in the database.
For the WinC variant, you will have to make some simple changes to the source code to make the dynamic call work. This is due to the way Plex generates the name of the input/output variables when a call is made.
Open the source code WinCDynamicCall scoped by your callback point.
This is the original content of the source code, the highlighted strings must be replaced.
ObCallExternalFunction(p_fnc_data, &v->ObIn_ReplaceFromDummyCall, &v->ObOut_ReplaceFromDummyCall, &(1:), &(1:), " ", 0); v->Environment0.xReturned_status12 = v->st_returned;
The highlighted texts must be replaced with a value that is specific to the callback point.
To find out what the texts should be replaced with, generate the callback point and open the generated source. Find the subroutine Dummy Call - an example of the content is shown here:
// Sub Dummy Call // Pre Point Start Dummy Call { } // Edit Point Start Dummy Call { } // Post Point Start Dummy Call { } // Comment This subroutine will NOT be executed // Comment It is only here to make it possible to determine the variable and fields names you must use in the source code for the dynamic calls // Call WSYAPI/CallbackFunctions.CallbackPoints.WebServer.ApplicationServiceEnd.AbstractCallbackFunction ObCallMgr::Call(p_fnc_data, &v->ObIn_S1dy9cc, &v->ObOut_S1dy9cc, OB_RTDI_S1dy9cc); v->Environment0.xReturned_status12 = v->st_returned; // Pre Point End Dummy Call { } // Edit Point End Dummy Call { } // Post Point End Dummy Call
The highlighted names are the texts you must use to replace in the source code.
Find the names of the ObIn and ObOut variables (as shown above) - and use these names to replace the texts "ReplaceFromDummyCall" in the source code WinCDynamicCall.
This means that in the current example, the final content of the source code will be:
ObCallExternalFunction(p_fnc_data, &v->ObIn_S1dy9cc, &v->ObOut_S1dy9cc, &(1:), &(1:), " ", 0); v->Environment0.xReturned_status12 = v->st_returned;