Page 1 of 1

Librerias de Sentinel para Harbour/xHarbour

PostPosted: Fri Jul 03, 2015 9:45 am
by Antonio Linares
Tiene alguien las librerías para usar Sentinel desde Harbour/xharbour ?

gracias!

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Fri Jul 03, 2015 1:07 pm
by karinha
Master, que hace Sentinel? Para que sirve? Gracias, saludos.

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Fri Jul 03, 2015 1:16 pm
by pablovidal
Espero que te sirva esto...
Code: Select all  Expand view

#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

 

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Fri Jul 03, 2015 1:36 pm
by Antonio Linares
Pablo,

Muchas gracias!

Es para Gustavo Moreno y para cualquier usuario al que le pueda servir :-)

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Fri Jul 03, 2015 2:11 pm
by ruben Dario
Saludos.

Pregunta por Curiosidad, para que sirven estas librerias,

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Fri Jul 03, 2015 2:33 pm
by Antonio Linares
Por lo que tengo entendido es para protección anti copias de los EXEs.

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Tue Jul 07, 2015 9:46 pm
by HunterEC
Pablo:

¿ Me podrías contactar a través de mensaje de texto para envíarte mi dirección de correo electrónico y de esta manera hacerte unas preguntas de candados Sentinel ? Gracias !

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Tue Jul 07, 2015 11:01 pm
by pablovidal
Enviame un correo pabloalbertovidal arroba gmail punto com

Re: Librerias de Sentinel para Harbour/xHarbour

PostPosted: Wed Jul 08, 2015 6:57 pm
by HunterEC
Pablo:

Te envié correo. Gracias.