FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Librerias de Sentinel para Harbour/xHarbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 09:45 AM

Tiene alguien las librerías para usar Sentinel desde Harbour/xharbour ?

gracias!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 01:07 PM

Master, que hace Sentinel? Para que sirve? Gracias, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 01:16 PM
Espero que te sirva esto...
Code (fw): Select all Collapse
#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
Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 01:36 PM

Pablo,

Muchas gracias!

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1078
Joined: Thu Sep 27, 2007 03:47 PM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 02:11 PM

Saludos.

Pregunta por Curiosidad, para que sirven estas librerias,

Ruben Dario Gonzalez
Cali-Colombia
rubendariogd@hotmail.com - rubendariogd@gmail.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Fri Jul 03, 2015 02:33 PM

Por lo que tengo entendido es para protección anti copias de los EXEs.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Tue Jul 07, 2015 09:46 PM

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 !

Posts: 401
Joined: Thu Oct 06, 2005 10:15 PM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Tue Jul 07, 2015 11:01 PM

Enviame un correo pabloalbertovidal arroba gmail punto com

Saludos,



Pablo Alberto Vidal

/*

------------------------------------------------------

Harbour 3.2.0, Fivewin 17.02, BCC7

------------------------------------------------------

*/
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Librerias de Sentinel para Harbour/xHarbour
Posted: Wed Jul 08, 2015 06:57 PM

Pablo:

Te envié correo. Gracias.

Continue the discussion