#ifdef PHONEDB_EXPORTS
#define PHONEDB_API extern "C" __declspec(dllexport)
#else
#define PHONEDB_API extern "C" __declspec(dllimport)
#endif


#define PHONE_DB_PHONE_LEN		8
#define PHONE_DB_LASTNAME_LEN	30
#define PHONE_DB_NAME_LEN		30
#define PHONE_DB_PATRONYM_LEN	30
#define PHONE_DB_STREET_LEN		30
#define PHONE_DB_HOUSE_LEN		5
#define PHONE_DB_HOUSING_LEN	5
#define PHONE_DB_APARTMENT_LEN	5

#define PHONE_DB_MAX_LEN		30


typedef struct _PHONE_DB_RECORD {
	char phone[PHONE_DB_PHONE_LEN];
	char lastname[PHONE_DB_LASTNAME_LEN];
	char name[PHONE_DB_NAME_LEN];
	char patronym[PHONE_DB_PATRONYM_LEN];
	char street[PHONE_DB_STREET_LEN];
	char house[PHONE_DB_HOUSE_LEN];
	char housing[PHONE_DB_HOUSING_LEN];
	char apartment[PHONE_DB_APARTMENT_LEN];
} PHONE_DB_RECORD;

#define PHONE_DB_CFIELDS 8


PHONEDB_API const char*
OpenDatabase(const TCHAR *filename, int *cRecordsPtr);

PHONEDB_API BOOL
CloseDatabase(void);

PHONEDB_API BOOL
SearchInDatabase(PHONE_DB_RECORD *foundRecordPtr, 
				 const PHONE_DB_RECORD *templateRecordPtr,
				 int cEqualFieldsNeed);

PHONEDB_API void
FillDatabaseRecord(
	PHONE_DB_RECORD *recordPtr,
	const char *phone,
	const char *lastname,
	const char *name,
	const char *patronym,
	const char *street,
	const char *house,
	const char *housing,
	const char *apartment);
Соседние файлы в папке PhoneDB