FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Anybody with success with NSLock ?
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
Anybody with success with NSLock ?
Posted: Mon Mar 05, 2007 03:49 PM

Dear All,

Has anybody met success with NSLock ? I am using FWH May-2006 build and Win-Xp SP2. But my following code gives me GPF.

Can somebody help me ?

TIA
Milan.

-----------------------Cut-------------------------------
// FiveWin ActiveX support demo - Using Adobe Acrobat Reader

include "FiveWin.ch"

function Main()

local oWnd, oActiveX, cLiberationKey := space(16)

DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

oActiveX = TActiveX():New( oWnd, "nslock15vb5.ActiveLock" )

oActiveX:Do( "Password" , "rochinha" )
oActiveX:Do( "SoftwareName" , "5Volution" )
oActiveX:Do( "LiberationKeyLength", 16 )
oActiveX:Do( "SoftwareCodeLength" , 16 )

//? oActiveX:GetProp( "SoftwareCode" )

if ! oActiveX:GetProp( "RegisteredUser" )
MsgGet( "Entre a chave de liberacao",; // Title
"Chave:",; // Label
@cLiberationKey ) // A variable by reference
oActiveX:Do( "LiberationKey", cLiberationKey )
endif

if ! oActiveX:GetProp( "RegisteredUser" )
if oActiveX:GetProp( "LastRunDate" ) > date()
? 'Data foi retrocedida. Programa sera encerrado'
else
? 'Faltam ' + Str( 30 - oActiveX:GetProp( "UsedDays" ) ) + ' dias.'
endif
? 'DEMONSTRACAO'
oWnd:cCaption := 'DEMONSTRACAO'
SysRefresh()
else
? 'REGISTRADO'
oWnd:cCaption := 'REGISTRADO'
SysRefresh()
endif

//oWnd:oClient = oActiveX // To fill the entire window surface

ACTIVATE WINDOW oWnd

return nil
-------------------------------------Paste----------------------------

Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
Anybody with success with NSLock ?
Posted: Mon Mar 05, 2007 05:59 PM

The Sentinel Super Pro hardkey has a native (x)Harbour driver developed by ourselves.

It supports all the features of the lock using both, native C functions or the TSentinel Class.

Saludos

R.F.
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
Anybody with success with NSLock ?
Posted: Tue Mar 06, 2007 01:20 AM

Hello,

What GPF you found?

I test the example in a Windows Server 2003 and XP/ME in virtual PC.

Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
Anybody with success with NSLock ?
Posted: Tue Mar 06, 2007 02:21 AM
This is the new code

// FiveWin ActiveX support demo - Using Adobe Acrobat Reader

#include "FiveWin.ch"

function Main()

   local oWnd, oActiveX, cLiberationKey := space(16)

   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "nslock15vb5.ActiveLock" )

   oActiveX:SetProp( "Password", "rochinha" )
   oActiveX:SetProp( "SoftwareName", "5Volution" )
   oActiveX:SetProp( "LiberationKeyLength", 8 )
   oActiveX:SetProp( "SoftwareCodeLength" , 8 )

   if ! oActiveX:GetProp( "RegisteredUser" )
      MsgGet( "Entre a chave de liberacao",; // Title
              "Chave: ("+oActiveX:GetProp( "SoftwareCode" )+")",; // Label
              @cLiberationKey )              // A variable by reference
      oActiveX:SetProp( "LiberationKey", alltrim(cLiberationKey) )
   endif

   if ! oActiveX:GetProp( "RegisteredUser" )
      if oActiveX:GetProp( "LastRunDate" ) > date()
         ? 'Data foi retrocedida. Programa sera encerrado'
      else
         ? 'Faltam ' + Str( 30 - oActiveX:GetProp( "UsedDays" ) ) + ' dias.'
      endif
      ? 'DEMONSTRACAO'
      oWnd:cCaption := 'DEMONSTRACAO'
      SysRefresh()
   else
      ? 'REGISTRADO'
      oWnd:cCaption := 'REGISTRADO'
      SysRefresh()
   endif

   //oWnd:oClient = oActiveX // To fill the entire window surface

   ACTIVATE WINDOW oWnd 

return nil


Remember if you registered the .OCX in your system:

C:\WINDOWS\SYSTEM32\REGSVR32 C:\???\NSLOCK15VB5.OCX
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
Anybody with success with NSLock ?
Posted: Tue Mar 06, 2007 10:29 AM

Dear Rochina,

Thanks. It worked like that.

Where can I get information in English abt NSLock ? Does it generate different key for the different computer ?

TIA
Milan.

Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
Anybody with success with NSLock ?
Posted: Tue Mar 06, 2007 10:31 AM
Dear RF,

Your www.google.com seems to be down today. I am not able to access it. Can you send me more information about Sentinel Super Pro ?

TIA
Milan.

RF wrote:The Sentinel Super Pro hardkey has a native (x)Harbour driver developed by ourselves.

It supports all the features of the lock using both, native C functions or the TSentinel Class.
Posts: 310
Joined: Sun Jan 08, 2006 10:09 PM
Anybody with success with NSLock ?
Posted: Tue Mar 06, 2007 01:04 PM

Milan

The last example work fine with NSLOCK15VB5.OCX. I made modifications to Activex SetProp/GetProp.

I found http://www.activelock.com with more informations about this .OCX.

Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
Anybody with success with NSLock ?
Posted: Tue Mar 06, 2007 03:46 PM
Milan Mehta wrote:Dear RF,

Your www.google.com seems to be down today. I am not able to access it. Can you send me more information about Sentinel Super Pro ?

TIA
Milan.



The driver was developed for the Sentinel Company, it should be included with all the Sentinel Super Pro Developer Kits.
Saludos

R.F.
Posts: 115
Joined: Mon Oct 17, 2005 04:42 AM
Anybody with success with NSLock ?
Posted: Wed Mar 07, 2007 05:23 AM

Dear Rochina,

I visited the site www.activelock.com. But it does not alllow me to register as new member. But anyway, they offer new version 1.8 also. Does that work too with xHarbour ? Let me know if you have experemented.

Does NSLock can work with pure xHarbour (no GUI) ?

TIA
Milan.

Continue the discussion