Anybody with success with NSLock ?

Anybody with success with NSLock ?

Postby Milan Mehta » Mon Mar 05, 2007 3: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----------------------------
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India

Postby R.F. » Mon Mar 05, 2007 5: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.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby Rochinha » Tue Mar 06, 2007 1:20 am

Hello,

What GPF you found?

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

Postby Rochinha » Tue Mar 06, 2007 2:21 am

This is the new code

Code: Select all  Expand view
// 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
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

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

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

Postby Rochinha » Tue Mar 06, 2007 1: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.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby R.F. » Tue Mar 06, 2007 3: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.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby Milan Mehta » Wed Mar 07, 2007 5: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.
Milan Mehta
 
Posts: 115
Joined: Mon Oct 17, 2005 4:42 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests