Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 9:45 am
Tiene alguien las librerías para usar Sentinel desde Harbour/xharbour ?
gracias!
gracias!
www.FiveTechSoft.com
https://fivetechsoft.com/forums/
Code: Select all
#define SP_UPDCMD_CHANGE_DEVICE_TIME 0x21
Function SNGetHora( hHeader, aData )
Return( SFNTGetDeviceInfo( hHeader, @aData ) == 0 )
Function SNGetString( )
Return Nil
//-------------------------------------------------------------------------------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include "SentinelKeys.h" /* Header file for the Sentinel Keys client library */
#include "SentinelKeysLicense.h" /* Header file for this License */
//-------------------------------------------------------------
// Obtiene la licencia
//-------------------------------------------------------------
HB_FUNC( SFNTGETLICENSE )
{
SP_HANDLE license ;
hb_retnl( SFNTGetLicense( DEVELOPERID, SOFTWARE_KEY, LICENSEID, 32, &license ) ) ;
hb_stornl( ( LONG ) license, 1 );
}
//-------------------------------------------------------------
// Lee un string desde la llave
//-------------------------------------------------------------
HB_FUNC( SFNTREADSTRING )
{
SP_BYTE value[ 256 ];
SP_DWORD length = hb_parnl( 4 );
hb_retnl( ( LONG ) SFNTReadString( ( SP_HANDLE ) hb_parnl( 1 ), ( SP_DWORD ) hb_parnl( 2 ), value, length ) );
hb_storc( value, 3 );
hb_xfree( value );
}
//-------------------------------------------------------------
// Lee un string desde la llave
//-------------------------------------------------------------
HB_FUNC( GETDATETIME )
{
SP_DEVICE_INFO deviceInfo;
hb_retnl( SFNTGetDeviceInfo( ( SP_HANDLE ) hb_parnl( 1 ), &deviceInfo ) ) ;
hb_stornl( ( LONG ) deviceInfo.timeValue.year , 2, 1 );
hb_stornl( ( LONG ) deviceInfo.timeValue.month , 2, 2 );
hb_stornl( ( LONG ) deviceInfo.timeValue.dayOfMonth, 2, 3 );
hb_stornl( ( LONG ) deviceInfo.timeValue.hour , 2, 4 );
hb_stornl( ( LONG ) deviceInfo.timeValue.minute , 2, 5 );
hb_stornl( ( LONG ) deviceInfo.timeValue.second , 2, 6 );
}
//-------------------------------------------------------------
// Lee un string desde la llave
//-------------------------------------------------------------
HB_FUNC( SFNTGETDEVICEINFO )
{
SPP_DEVICE_INFO deviceInfo;
hb_retnl( SFNTGetDeviceInfo( ( SP_HANDLE ) hb_parnl( 1 ), deviceInfo ) ) ;
hb_stornl( deviceInfo->timeValue.year , 2, 1 );
hb_stornl( deviceInfo->timeValue.month , 2, 2 );
hb_stornl( deviceInfo->timeValue.dayOfMonth, 2, 3 );
hb_stornl( deviceInfo->timeValue.hour , 2, 4 );
hb_stornl( deviceInfo->timeValue.minute , 2, 5 );
hb_stornl( deviceInfo->timeValue.second , 2, 6 );
}
#pragma ENDDUMP