![]() | Programming Guide | ![]() |
Install a C Web event hook function
int sm_web_set_onevent(char *handler);
handler- The name of the Web event handler. If
handleris the null pointer or the null string, the Web event handler is uninstalled. Otherwise, it must be the name of a C function installed in the prototyped function list.
- 0 The Web event hook function was installed or uninstalled.
- -1
handleris not in the list of installed prototyped C functions.
handler is called after processing has completed for each request. The prototype of this function is:
voidhandler(char*command, char*path_info, char*arg,intelapsed_time);This function is passed the following parameters:
command- A string containing the web command that was processed. It will be either
"GET"or"POST".path_info- This is the value of
PATH_INFOin the CGI request.arg- The query string for GET and the form name for POST.
elapsed_time- This is the elapsed time for the
Webcommand in milliseconds.
![]()
![]()
![]()
![]()