wcConClose( )

Syntax . . Returns . . Tips . . Program Example . . Related Topics . . A-Z Index . . Home

Finishes processing user's request. Sends the result HTML page back to the user.

Example

returnCode = wcConClose(cntrlHandle);

Syntax

int wcConClose(void *controlHandle)
controlHandleThe handle to the control structure.

Returns

0Success.
Error codeFailure or exception. For a list of possible error codes, see Error Messages.

Tips

Program Example

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.

Related Topics

wcConOpen( )


Top of Page . . Syntax . . Returns . . Tips . . Program Example . . A-Z Index . . Home