home *** CD-ROM | disk | FTP | other *** search
- // BDE - (C) Copyright 1995 by Borland International
-
- // test.c
- #include "snipit.h"
-
- //=====================================================================
- // Function:
- // Test();
- //
- // Description:
- // This file provides a framework to use when writing new
- // IDAPI code.
- //=====================================================================
- void
- Test(void)
- {
- hDBIDb hDb; // Handle to the database
- DBIResult rslt; // Return value from IDAPI functions
-
- Screen("*** Test ***\r\n");
-
- BREAK_IN_DEBUGGER();
-
- Screen(" Initializing IDAPI...");
- if (InitAndConnect(&hDb) != DBIERR_NONE)
- {
- Screen("\r\n*** End of Example ***");
- return;
- }
-
- Screen(" Set the directory which is used by the database...");
- rslt = DbiSetDirectory(hDb, (pCHAR) szTblDirectory);
- ChkRslt(rslt, "SetDirectory");
-
- Screen("\r\n Put test code here:\r\n");
-
- Screen(" Close the database and exit IDAPI...");
- CloseDbAndExit(&hDb);
-
- Screen("\r\n*** End of Example ***");
- }
-