Anybody with success with NSLock ?

Post Reply
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Anybody with success with NSLock ?

Post by Milan Mehta »

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----------------------------
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

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.
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Hello,

What GPF you found?

I test the example in a Windows Server 2003 and XP/ME in virtual PC.
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

This is the new code

Code: Select all

// 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
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

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.
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

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.
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

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.
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

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.
Milan Mehta
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Post by Milan Mehta »

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.
Post Reply