User Guide

CCFXRequest class 765
Example
The following example throws an exception indicating that an unexpected error occurred while
processing a request:
char buffError[512] ;
wsprintf( buffError,
"Unexpected Windows NT error number %ld "
"occurred while processing request.", GetLastError() ) ;
pRequest->ThrowException( "Error occurred", buffError ) ;
CCFXRequest::Write
Syntax
void CCFXRequest::Write(LPCSTR lpszOutput)
Description
Writes text output back to the user.
Parameters
Example
The following example creates a buffer to hold an output string, fills the buffer with data, and
writes the output back to the user:
CHAR buffOutput[1024] ;
wsprintf( buffOutput, "The destination is: %s",
pRequest->GetAttribute("DESTINATION") ) ;
pRequest->Write( buffOutput ) ;
CCFXRequest::WriteDebug
Syntax
void CCFXRequest::WriteDebug(LPCSTR lpszOutput)
Description
Writes text output into the debug stream. The text is only displayed to the end-user if the tag
contains the
DEBUG attribute. (For more information, see CCFXRequest::Debug.)
Parameters
Example
The following example checks whether the DEBUG attribute is present; if so, it writes a brief
debug message:
if ( pRequest->Debug() )
{
pRequest->WriteDebug( "Top secret debug info" ) ;
}
Parameter Description
lpszOutput Text to output
Parameter Description
lpszOutput Text to output