Beispiel #1
0
RC EXPFUNC InitPreds(ENGid eid, void* p)
#endif
{
   RC rc;
   char buf[200];
   char msg[100];

   rc = lsInitPreds(eid, dbPreds);
   if (rc)
   {
      lsGetExceptMsg(eid, msg, 100);  // get the error message and display it!
      sprintf(buf, "Error Loading aODBC Predicates: %s", msg);
      MessageBox(NULL, buf, "aODBC Error", MB_OK);
   }
//   else
//      MessageBox(NULL, "aODBC Predicates Loaded", "aODBC Info", MB_OK);
   return 0;
}
/****if* CVUtilities.General/InitPreds
 -------------------------------------------------------------------------------
 *
 * FUNCTION
 *	InitPreds
 *
 * SYNTAX
 *	InitPreds( ENGid  eid, void *  p ) ;
 *
 * PURPOSE
 *	Adds the CVUtilities extended predicates to Amzi logicbase.	
 *
 * ARGUMENTS
 *	ENGid	engine (i) -
 *		AMZI Server id.
 *
 *	void *	p (i) -
 *		Not used.
 *
 * RETURN VALUE
 *	This function always returns 0.
 *
 -------------------------------------------------------------------------------
 * SOURCE
 */
DLLENTRYPOINT	InitPreds ( ENGid  eid, void *  p )
   {
	RC		rc ;
	characters	buffer [128] ;


	// Perform the initialization
	rc = lsInitPreds ( eid, extended_predicates );


	// Something wrong ?
	if (rc)
	    {
		sprintf( buffer, TEXTSTRING( "Error #%d while loading the predicates from module %s." ),
				rc, LSXNAME ) ;
		MessageBox ( NULL, buffer, LSXNAME, MB_OK);
	     }
   
	return (0) ;
    }
Beispiel #3
0
extern "C" RC EXPFUNC InitPreds(ENGid eid, void* p)
#endif
{
   RC rc;
   _TCHAR buf[80];

   rc = lsInitPreds(eid, extPreds);
   if (rc)
   {
#ifdef _WIN32
      _stprintf(buf, _T("Error #%d Loading atcltk Predicates"), rc);
      MessageBox(NULL, buf, "atcltk lsx", MB_OK);
#else
      printf(_T("Error #%d Loading atcltk Predicates"), rc);
#endif
   }
   //else
   //   MessageBox(NULL, "ATclTk Predicates Loaded", "ATCLTK LSX", MB_OK);

   return 0;
}