Estoy creando llamadas a funciones mysql mediante el comando:
(Tengo otras razones importantes para hacerlo, sé sobre TDolphin, pero no puedo usarlo).
Estos a continuación están funcionando bien.
Code: Select all
* =============================================================================
DLL FUNCTION mysql_init( mysql AS LONG ) AS LONG PASCAL FROM "mysql_init" LIB hLibMySQL // ok
* =============================================================================
DLL FUNCTION mysql_real_connect( mysql AS LONG ,;
host AS LPSTR ,;
user AS LPSTR ,;
passwd AS LPSTR ,;
db AS LPSTR ,;
port AS _INT ,;
unix_socket AS _INT ,;[b][/b]
client_flag AS _INT ) AS BOOL PASCAL ;
FROM "mysql_real_connect" LIB hLibMySQL // ok
* =============================================================================
DLL FUNCTION mysql_query( mysql AS LONG, cQuery AS LPSTR ) AS _INT PASCAL FROM "mysql_query" LIB hLibMySQL // ok
* =============================================================================
Code: Select all
DLL FUNCTION mysql_fetch_row( mysql AS LONG ) AS LPSTR PASCAL ;
FROM "mysql_fetch_row" LIB hLibMySQL // MYSQL_ROW
* =============================================================================
DLL FUNCTION mysql_list_dbs( mysql AS LONG, const AS LPSTR ) AS PTR PASCAL ;
FROM "mysql_list_dbs" LIB hLibMySQL // MYSQL_RES
DLL FUNCTION mysql_fetch_field( result AS LONG ) AS LPSTR PASCAL ;
FROM "mysql_fetch_field" LIB hLibMySQL // MYSQL_FIELD
Code: Select all
#ifndef _C_TYPES
#define _C_TYPES
#define VOID 0
#define BYTE 1
#define CHAR 2
#define WORD 3
#define BOOL 5
#define HDC 6
#define LONG 7
#define _INT 7
#define STRING 8
#define LPSTR 9
#define PTR 10
#define _DOUBLE 11 // conflicts with BORDER DOUBLE
#define DWORD 12
#endif
Ari
Brasil