64,654
社区成员
发帖
与我相关
我的任务
分享
#ifndef _ADO_SQL_H_
#define _ADO_SQL_H_
#ifndef ADO_API
#ifdef __cplusplus
#define ADO_API extern "C" __declspec(dllimport)
#else
#define ADO_API __declspec(dllimport)
#endif
#else
#undef ADO_API
#ifdef __cplusplus
#define ADO_API extern "C" __declspec(dllexport)
#else
#define ADO_API __declspec(dllexport)
#endif
#endif
#ifndef STDCALL
#define STDCALL __stdcall
#endif
#ifndef Bool
#define Bool int
#endif
#ifndef True
#define True 1
#endif
#ifndef False
#define False 0
#endif
struct ADOConn;
#define ADO_FIELD_NAME_LEN 64
#define ADO_FIELD_VALUE_LEN (8 * 1024)
struct ADOFieldInfo
{
char name[ADO_FIELD_NAME_LEN];
char value[ADO_FIELD_VALUE_LEN];
};
typedef void (STDCALL* ADOQueryCallback)(const struct ADOFieldInfo* info, int fieldCount, void* user);
ADO_API Bool STDCALL ADO_Initialize();
ADO_API void STDCALL ADO_Uninitialize();
ADO_API struct ADOConn* STDCALL ADO_CreateConnection(const char* connString);
ADO_API void STDCALL ADO_DestroyConnection(struct ADOConn* conn);
ADO_API Bool STDCALL ADO_Exec(struct ADOConn* conn, const char* sql);
ADO_API void STDCALL ADO_Query(struct ADOConn* conn, const char* sql, ADOQueryCallback cb, void* user);
#endif