Files
Dario Sassi 3ad00a017f Include :
- aggiornamento prototipi.
2025-01-25 12:10:25 +01:00

58 lines
2.4 KiB
C

//----------------------------------------------------------------------------
// EgalTech 2024-2025
//----------------------------------------------------------------------------
// File : EBsAPI.h Data : 24.01.25 Versione : 2.7a1
// Contenuto : API (application programming interface).
//
//
//
// Modifiche : 05.10.24 DS Creazione modulo.
// 24.01.25 DS Aggiunta gestione messaggi.
//
//----------------------------------------------------------------------------
#pragma once
#define NOMINMAX
#include <windows.h>
//----------------------- Macro per import/export ----------------------------
#undef EGTBASIS_EXPORT
#if defined( I_AM_EGTBASIS) // da definirsi solo nella DLL
#define EGTBASIS_EXPORT __declspec( dllexport)
#else
#define EGTBASIS_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
// API
// Protezione
EGTBASIS_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt1, unsigned int* pnOpt2) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
// Liberazione memoria blocchi dati ritornati (di solito per stringhe)
EGTBASIS_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
// Messaggi
EGTBASIS_EXPORT BOOL __stdcall EgtLoadMessages( const wchar_t* wsMsgFilePath) ;
EGTBASIS_EXPORT const wchar_t* __stdcall EgtGetMsg( int nMsg) ;
// Logger
EGTBASIS_EXPORT BOOL __stdcall EgtInitLogger( int nDebug, const wchar_t* wsLogFile) ;
EGTBASIS_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg, int nDebugLevel) ;
// Ini File
EGTBASIS_EXPORT BOOL __stdcall EgtGetStringUtf8FromIni( const wchar_t* wsSec, const wchar_t* wsKey,
const wchar_t* wsDef, wchar_t*& wsVal, const wchar_t* wsIniFile) ;
EGTBASIS_EXPORT BOOL __stdcall EgtWriteStringUtf8ToIni( const wchar_t* wsSec, const wchar_t* wsKey,
const wchar_t* wsVal, const wchar_t* wsIniFile) ;
#ifdef __cplusplus
}
#endif