Patch level : 12.0 no-patch

Files correlati     : 
Commento            : Reso il codice esportabile per .dll, in xvturl è stata creata una funzione dummy

git-svn-id: svn://10.65.10.50/branches/R_10_00@24175 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
mtollari 2017-11-02 14:08:41 +00:00
parent 8e66798881
commit 72d11b06f6
4 changed files with 32 additions and 8 deletions

View File

@ -497,7 +497,7 @@ const char* TXvt_recordset::getDate(const char * field)
try
{
SADateTime app = _RCS(_recset)->Field(field).asDateTime();
char date[10];
static char date[10];
sprintf_s(date, (size_t)10, "%d-%d-%d", app.GetDay(), app.GetMonth(), app.GetYear());
return date;
}

View File

@ -1,6 +1,12 @@
#pragma once
#ifndef __XVTDB_H
#define __XVTDB_H
#include <string>
#define DBDLL __declspec(dllexport)
#ifndef NOERR
#define NOERR 0
#endif
@ -8,7 +14,7 @@
#define NOT_INITIALIZED -86552
#define ERROR_FREEZED -883
enum TT_driver
DBDLL enum TT_driver
{
//! DBMS client is not specified
TSDB_undefined,
@ -38,7 +44,7 @@ enum TT_driver
TSDB_SQLAnywhere
};
enum isoLvl { unknown = -1, uncommitted, committed, rr, serializable };
DBDLL enum isoLvl { unknown = -1, uncommitted, committed, rr, serializable };
#define P_CONN_VOID void *
#define P_COMM_VOID void *
@ -46,7 +52,7 @@ enum isoLvl { unknown = -1, uncommitted, committed, rr, serializable };
/* Esempio parametri da passare con MSSQL:
* db = SERVER@DATABASE (NBKDELLI7TOLLAR\MSSQLSERVER14@project_vahlalla)
*/
int xvt_create_connection(P_CONN_VOID con, const char* db, const char* user, const char* pass, TT_driver tipoDb);
DBDLL int xvt_create_connection(P_CONN_VOID con, const char* db, const char* user, const char* pass, TT_driver tipoDb);
/******************************************************************************
@ -54,7 +60,7 @@ int xvt_create_connection(P_CONN_VOID con, const char* db, const char* user, con
* Wrapper base di SACommand e SAConnection, classe per l'esecuzione di query *
* permette una connessione a vari DB tramite molteplici drivers *
******************************************************************************/
class TXvt_recordset
class DBDLL TXvt_recordset
{
protected:
/**< Recordset */
@ -62,6 +68,8 @@ protected:
/**< Oggetto della connessione */
P_COMM_VOID _con;
/**< Ultima stringa con codice di errore ricevuto */
// Con la trasformazione in DLL questa variabile da il warning C4251, teoricamente si può evitare il workaround perchè la variabile _ITERATOR_DEBUG_LEVEL è uguale su tutti i nostri progetti
// link: https://stackoverflow.com/questions/8976617/when-exporting-stl-stdbasic-string-template-from-dll-i-get-a-lnk2005-error
std::string _stringError;
/**< Ultimo codice di errore ricevuto */
long _codeError;
@ -196,3 +204,5 @@ public:
void defrost() { _freezed = false; }
};
#endif

View File

@ -1,2 +1,7 @@
#include "xvturl.h"
#include <curl/curl.h>
void functionTest()
{
bool tolla = true;
}

View File

@ -1,3 +1,12 @@
#pragma once
#ifndef __XVTURL_H
#define __XVTURL_H
#define URLDLL __declspec(dllexport)
#include <string>
URLDLL void functionTest();
#endif