306
void ProcessTagRequest( CCFXRequest* pRequest )
{
}
CCFXRequest::SetVariable
void CCFXRequest::SetVariable(LPCSTR lpszName , LPCSTR lpszValue )
Sets a variable in the calling template. If the variable name specified already exists in
the template, its value is replaced. If it does not already exist, a new variable is created.
The values of variables created using
manner as other template variables (e.g., #MessageSent#).
lpszName
Name of variable.
lpszValue
Value of variable.
Example
The following example sets the value of a variable named
success of an operation performed by the custom tag:
BOOL bMessageSent ;
...attempt to send the message...
if ( bMessageSent == TRUE )
{
}
else
{
}
CCFXRequest::ThrowException
void CCFXRequest::ThrowException(LPCSTR lpszError ,
LPCSTR lpszDiagnostics )
Throws an exception and ends processing of this request. You should call this function
when you encounter an error that does not allow you to continue processing the
request. Note that this function is almost always combined with the
try
{
MYTAGDATA tagData ;
pRequest->SetCustomData( (LPVOID)&tagData ) ;
... remainder of procedure ...
pRequest->SetVariable( "MessageSent", "Yes" ) ;
pRequest->SetVariable( "MessageSent", "No" ) ;
Developing Web Applications with ColdFusion
can be accessed in the same
SetVariable
'MessageSent'
based on the