Page 1 of 1

URGENT - Serial number over network

Posted: Wed Jan 31, 2007 8:14 pm
by Jeff Barnes
Hi Everybody,

I have a situation that I hope someone can help with....

I use a "software key" to protect my application from unauthorized copies.
The key is based on the serial number of the hard drive (nSerialHD())

I have just been asked if it is possible to install my program on a network and have others access the .exe via a shared drive letter.

The program runs but of course it looks at the LOCAL computers hard drive for the serial number not where the program is actually sitting (lets say drive X:)

Is it possible to get the serial number of the system where the program is sitting?


Thanks,

Jeff

Re: URGENT - Serial number over network

Posted: Wed Jan 31, 2007 8:36 pm
by Enrico Maria Giordano
You may try

Code: Select all

nSerialHD( "X:\" )
where X is the network mapped drive but I'm not sure it will work.

EMG

Posted: Thu Feb 01, 2007 9:01 am
by James Bott
Jeff,

You may want to try searching the forum for this. I seem to remember some discussion about this awhile back.

James

Posted: Thu Feb 01, 2007 1:29 pm
by Rochinha
Hello Friends

I use one proprietary solution, geting a serial number in the server with nSerialHD, inputing a password code liberation and saving inside .EXE. The application runs on other computer with no problems, but don't moved.

Original post in http://www.pctoledo.com.br/forum/viewtopic.php?t=3275

But you can test NSLock.OCX too, review this post:

http://fivetechsoft.com/forums/viewtopi ... ght=nslock

Posted: Thu Feb 01, 2007 1:48 pm
by Rochinha
Hii

I found this too:

Code: Select all

#include "struct.ch"

function NetSerialNumber()
   local oNCB, oAdapterStatus, cBuffer
   STRUCT oNCB
      MEMBER command  AS BYTE
      MEMBER retcode  AS BYTE
      MEMBER lsn      AS BYTE
      MEMBER num      AS BYTE
      MEMBER buffer   AS LONG
      MEMBER length   AS LONG
      MEMBER callname AS STRING LEN 16
      MEMBER name     AS STRING LEN 16
      MEMBER rto      AS BYTE
      MEMBER sto      AS BYTE
      MEMBER post     AS LONG
      MEMBER lana_num AS BYTE
      MEMBER cmd_cplt AS BYTE
      MEMBER reserve  AS STRING LEN 10
      MEMBER event    AS LONG
      MEMBER dummy    AS STRING LEN 30
   ENDSTRUCT
   STRUCT oAdapterStatus
      MEMBER address           AS STRING LEN 6
      MEMBER rev_major         AS BYTE
      MEMBER reserved0         AS BYTE
      MEMBER adapter_type      AS BYTE
      MEMBER rev_minor         AS BYTE
      MEMBER duration          AS LONG
      MEMBER frmr_recv         AS LONG
      MEMBER frmr_xmit         AS LONG
      MEMBER iframe_recv_err   AS LONG
      MEMBER xmit_aborts       AS LONG
      MEMBER xmit_success      AS LONG
      MEMBER recv_success      AS LONG
      MEMBER iframe_xmit_err   AS LONG
      MEMBER recv_buff_unavail AS LONG
      MEMBER t1_timeouts       AS LONG
      MEMBER ti_timeouts       AS LONG
      MEMBER reserved1         AS LONG
      MEMBER free_ncbs         AS LONG
      MEMBER max_cfg_ncbs      AS LONG
      MEMBER max_ncbs          AS LONG
      MEMBER xmit_buf_unavail  AS LONG
      MEMBER max_dgram_size    AS LONG
      MEMBER pending_sess      AS LONG
      MEMBER max_cfg_sess      AS LONG
      MEMBER max_sess          AS LONG
      MEMBER max_sess_pkt_size AS LONG
      MEMBER name_count        AS LONG
   ENDSTRUCT
   oNcb:command = 50 // NCBRESET
   MsgInfo( oNcb:command )
   MsgInfo( Netbios( oNcb:cBuffer ) )
   MsgInfo( oNcb:retcode )
   oNcb:command  = 51 // NCBASTAT
   oNcb:buffer   = GETVDMP32( StrPtr( oAdapterStatus:cBuffer ) )
   oNcb:length   = oAdapterStatus:SizeOf()
   oNcb:callname = "*" + space( 15 )
   MsgInfo( Netbios( oNcb:cBuffer ) )
   MsgInfo( oNcb:retcode )

return DecToHex( Asc( SubStr( oAdapterStatus:address, 1, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 2, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 3, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 4, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 5, 1 ) ) ) + ;
       DecToHex( Asc( SubStr( oAdapterStatus:address, 6, 1 ) ) )

DLL32 FUNCTION Netbios( pncb AS LPSTR ) AS LONG PASCAL LIB "NETAPI32.DLL"

Posted: Fri Feb 02, 2007 12:23 am
by Jeff Barnes
Thanks everybody.

posible solucion

Posted: Wed Feb 07, 2007 1:20 pm
by sildata
Trata de que se revise o chequee el numero serial solo y exclusivamente desde el equipo servidor con una funcion de CTIII que se llama NETDISK()
o algo parecido de esta manera cualquiera estacion de trabajo no verifica este numero y podra correr libremente, a mi me funciona pruebala.
Saludos
Rodolfo Silva
sildata@cantv.net

Posted: Thu Feb 08, 2007 9:31 am
by Silvio
How I can show in a window all pc link to me ( server) ?

Posted: Fri Feb 09, 2007 10:59 am
by Milan Mehta
Hello rochinha,

From where can I get NLSOCK.OCX ?

With best regards,

Milan.
Rochinha wrote:Hello Friends

I use one proprietary solution, geting a serial number in the server with nSerialHD, inputing a password code liberation and saving inside .EXE. The application runs on other computer with no problems, but don't moved.

Original post in http://www.pctoledo.com.br/forum/viewtopic.php?t=3275

But you can test NSLock.OCX too, review this post:

http://fivetechsoft.com/forums/viewtopi ... ght=nslock

Posted: Fri Feb 09, 2007 3:41 pm
by Rochinha
Here

Macoratti.NET

This is my test:

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: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
I'm test in Windows Server 2003.