Finishes processing user's request. Sends the result HTML page back to the user.
returnCode = wcConClose(cntrlHandle);
int wcConClose(void *controlHandle)
controlHandle | The handle to the control structure. |
0 | Success. |
Error code | Failure or exception. For a list of possible error codes, see Error Messages. |
The following code shows how wcConClose( ) is used in an application.
int requestLoop(wcp) void *wcp; { int ret; /* set defaults */ wcSetVariable(wcp, "MItab", "webPages"); wcSetVariable(wcp, "MIcol", "object"); wcSetVariable(wcp, "MInam", "ID"); wcSetVariable(wcp, "MIval", "main"); while(1) { if((ret = wcConOpen(wcp, 0)) < 0) return wcTraceErr(wcp, ret); handleRequest(wcp); if((ret = wcConClose(wcp)) < 0) return wcTraceErr(wcp, ret); } }
In this code fragment, it is assumed that the function handleRequest( ) has been declared to return an HTML page to the browser.