home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C Programming Starter Kit 2.0
/
SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso
/
bde
/
sdkqry.pak
/
QUERY.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-07-23
|
3KB
|
101 lines
// BDE - (C) Copyright 1994 by Borland International
#ifndef __QUERY_H
#define __QUERY_H
#include <windows.h>
#include <stdarg.h>
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <idapi.h>
#include <ctl3d.h>
#include <commdlg.h>
#include <io.h>
#include <direct.h>
#include "macro.h"
#include "query.rh"
#define WM_MYSETUP WM_USER + 1
#define MAX_DATABASE_HANDLES 10
// Common dialog defines
#define FILE_OPEN_DIALOG 0
#define FILE_SAVE_DIALOG 1
typedef struct {
hDBIDb hdb;
char szDatabaseName[81];
}DBStruct;
typedef DBStruct DBStructArray[MAX_DATABASE_HANDLES];
extern HWND hMainWnd;
extern const char szAppName[];
extern const char szDialogName[];
extern const char szConnectDialogName[];
extern HWND hMainWnd;
extern HINSTANCE hInst;
extern char far szMainHelpText[];
extern char far szConnectHelpText[];
extern WNDPROC _wpOrigWndProc;
extern WNDPROC _wpOrigWndProc1;
// Directory in which the tables exist. Full path name will be generated
// by the application
extern char far szTblDirectory[];
extern char far szPrivDirectory[];
//
// Function prototypes for DISPLAY.C
//
DBIResult DisplayTable(hDBICur hCur, UINT32 uDisplayNRecs);
void Screen(pCHAR pszMsg);
void Cls (void);
void DisplayProgress(char * szProgress);
//
// Function prototypes for QUERY.C
//
UINT16 SaveQuery(DBIQryLang QryType);
UINT16 LoadQuery(DBIQryLang QryType);
UINT16 SaveResultSet(hDBICur hCur, hDBIDb hDb);
BOOL InitApp (int nCmdShow);
BOOL CALLBACK _export ConnectDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK HourGlassCursor(BOOL turnOn);
CBRType DBIFN _export GenProgCallBack(CBType ecbType, UINT32 iClientData, pVOID pCbInfo);
UINT16 RemoveConnection(HWND hDlg, DBStructArray array, int nIndex);
long FAR _pascal _export MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
BOOL FAR _pascal _export AboutDlg (HWND hWnd, WORD msg, WORD wParam, LONG lParam);
long FAR _pascal _export EditSubClassProc(HWND hWnd, WORD msg, WORD wParam, LONG lParam);
int MakeFullPath(pCHAR pszDirectory, pCHAR pszRelativeDirectory);
//
// Function prototypes for ENGINE.C
//
DBIResult QueryDbiInit(void);
DBIResult QueryDbiExit(void);
void QueryDbiCloseDatabase(phDBIDb phDb);
hDBIDb QueryConnectToDatabase(HWND hWnd);
hDBIDb QueryGetStandardConnection(void);
void QueryResetConnectDialog(HWND hWnd, const DBStructArray dbarray,
const int iSelected);
DBIResult QueryQExec(hDBIDb hDb, DBIQryLang eQryLang,
char* szQuery, char *szOutputErrorString, phDBICur phCur);
BOOL QuerySaveResultSet(hDBICur hCur, hDBIDb hDb, char* szFileName);
DBIResult GetWorkingDirectory(hDBIDb hDb, pCHAR szDirctory);
DBIResult SetWorkingDirectory(hDBIDb hDb, pCHAR szDirctory);
DBIResult RegisterCallBack(hDBICur hCur, CBType ecbType, UINT32 iClientData,
UINT16 iCbBufLen, pVOID pCbBuf, pfDBICallBack pfCb);
void GetErrorInformation(char *szOutputErrorString);
DBIResult CleanUpAnswer(hDBICur *hCur);
// Macro for Subclassing the edit control.
#define SubClassWindow(hWnd, lpfn) \
((WNDPROC)SetWindowLong((hWnd), GWL_WNDPROC, \
(LPARAM)(WNDPROC)(lpfn)))
#endif