The client application is responsible for implementing an OnAppExistsActiveDocument event handler for some of the supported FileNet Application Integration commands. This event handler method should return a bool to the ExpressAddin, via the parameter list, that indicates whether the application has a currently active document.
HRESULT __stdcall CEventHandler::OnAppExistsActiveDocument(VARIANT_BOOL
*pExistsActiveDocument)
{
// Query the document object to determine if there is an
active document.
if( m_pDocument->ExistsActiveDocument() )
{
*pExistsActiveDocument = VARIANT_TRUE;
}
else
{
*pExistsActiveDocument = VARIANT_FALSE;
}
return S_OK;
}