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:
		
							parent
							
								
									8e66798881
								
							
						
					
					
						commit
						72d11b06f6
					
				@ -497,7 +497,7 @@ const char* TXvt_recordset::getDate(const char * field)
 | 
				
			|||||||
	try
 | 
						try
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		SADateTime app = _RCS(_recset)->Field(field).asDateTime();
 | 
							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());
 | 
							sprintf_s(date, (size_t)10, "%d-%d-%d", app.GetDay(), app.GetMonth(), app.GetYear());
 | 
				
			||||||
		return date;
 | 
							return date;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,12 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __XVTDB_H
 | 
				
			||||||
 | 
					#define __XVTDB_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define DBDLL __declspec(dllexport)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef NOERR
 | 
					#ifndef NOERR
 | 
				
			||||||
#define NOERR 0
 | 
					#define NOERR 0
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@ -8,7 +14,7 @@
 | 
				
			|||||||
#define NOT_INITIALIZED -86552
 | 
					#define NOT_INITIALIZED -86552
 | 
				
			||||||
#define ERROR_FREEZED		-883
 | 
					#define ERROR_FREEZED		-883
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum TT_driver 
 | 
					DBDLL enum TT_driver 
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	//! DBMS client is not specified
 | 
						//! DBMS client is not specified
 | 
				
			||||||
	TSDB_undefined,
 | 
						TSDB_undefined,
 | 
				
			||||||
@ -38,7 +44,7 @@ enum TT_driver
 | 
				
			|||||||
	TSDB_SQLAnywhere
 | 
						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_CONN_VOID void *
 | 
				
			||||||
#define P_COMM_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:
 | 
					/* Esempio parametri da passare con MSSQL:
 | 
				
			||||||
 * db = SERVER@DATABASE (NBKDELLI7TOLLAR\MSSQLSERVER14@project_vahlalla)
 | 
					 * 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	*
 | 
					 * Wrapper base di SACommand e SAConnection, classe per l'esecuzione di query	*
 | 
				
			||||||
 * permette una connessione a vari DB	tramite molteplici drivers							*
 | 
					 * permette una connessione a vari DB	tramite molteplici drivers							*
 | 
				
			||||||
 ******************************************************************************/
 | 
					 ******************************************************************************/
 | 
				
			||||||
class TXvt_recordset
 | 
					class DBDLL TXvt_recordset
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
protected:
 | 
					protected:
 | 
				
			||||||
	/**< Recordset																								*/
 | 
						/**< Recordset																								*/
 | 
				
			||||||
@ -62,6 +68,8 @@ protected:
 | 
				
			|||||||
	/**< Oggetto della connessione																*/
 | 
						/**< Oggetto della connessione																*/
 | 
				
			||||||
	P_COMM_VOID				_con;
 | 
						P_COMM_VOID				_con;
 | 
				
			||||||
	/**< Ultima stringa con codice di errore ricevuto							*/
 | 
						/**< 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;																		
 | 
						std::string				_stringError;																		
 | 
				
			||||||
	/**< Ultimo codice di errore ricevuto													*/
 | 
						/**< Ultimo codice di errore ricevuto													*/
 | 
				
			||||||
	long							_codeError;
 | 
						long							_codeError;
 | 
				
			||||||
@ -196,3 +204,5 @@ public:
 | 
				
			|||||||
	void defrost()	{ _freezed = false; }
 | 
						void defrost()	{ _freezed = false; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
@ -1,2 +1,7 @@
 | 
				
			|||||||
#include "xvturl.h"
 | 
					#include "xvturl.h"
 | 
				
			||||||
#include <curl/curl.h>
 | 
					#include <curl/curl.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void functionTest()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						bool tolla = true;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,3 +1,12 @@
 | 
				
			|||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef __XVTURL_H
 | 
				
			||||||
 | 
					#define __XVTURL_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define URLDLL __declspec(dllexport)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					URLDLL void functionTest();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user