home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / dbmsg / odbc / admndemo / errcheck.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-06  |  2.0 KB  |  57 lines

  1. //*---------------------------------------------------------------------------------
  2. //|  ODBC System Administrator
  3. //|
  4. //|  This code is furnished on an as-is basis as part of the ODBC SDK and is
  5. //|  intended for example purposes only.
  6. //|
  7. //|
  8. //|    Title: ERRCHECK.H
  9. //|
  10. //|      This include file contains the definitions for the ERRCHECK.C module.
  11. //|         This module contains common error checking functions.
  12. //|
  13. //*---------------------------------------------------------------------------------
  14. #ifndef errcheck_DEFS
  15. #define errcheck_DEFS
  16.  
  17. #include <windows.h>
  18. #include <string.h>
  19. #include "standard.h"
  20. #include "sql.h"
  21. #include "sqlext.h"
  22. #include "child.h"
  23.  
  24.  
  25.  
  26. //------------------------------------------------------------------------
  27. //  Defines
  28. //------------------------------------------------------------------------
  29. #define  RTN_MSG_SIZE      SQL_MAX_MESSAGE_LENGTH - 1
  30.  
  31. #define PostError(str)                                            \
  32.       DoPostError(str, __FILE__, __LINE__)
  33.  
  34.  
  35. //------------------------------------------------------------------------
  36. //  Declare global variables
  37. //------------------------------------------------------------------------
  38. extern dCSEG(char) szErrTitle[];
  39. extern dCSEG(char) szError[];
  40. extern dCSEG(char) szOutOfMemory[];
  41. extern dCSEG(char) szInvalidParms[];
  42. extern dCSEG(char) szRegisterClassFailed[];
  43.  
  44.  
  45. //------------------------------------------------------------------------
  46. //  Declare function prototypes
  47. //------------------------------------------------------------------------
  48. LPSTR GetSQLState(SWORD handletype, SQLHANDLE handle, SWORD *psMsgNum,
  49.                   LPSTR szState, SDWORD FAR * pfNative, LPSTR szMessage);
  50. void DoPostError(LPSTR szErr, LPSTR szFile, int cbLine);
  51. void PrintErrors(CHILDINFO FAR * ci, SWORD handletype);
  52. void PrintErrorsHwnd(HWND hwnd, SWORD handletype, SQLHANDLE handle);
  53. void DisplayErrors(HWND hwnd, LPSTR title, SWORD handletype, SQLHANDLE handle);
  54.  
  55.  
  56. #endif
  57.