Software Protection
Thank you jeff. Now I understand, the array musy be completed with proper values provided when you buy the product.
Also, I suppose that you have to include a dll into the software folder. Do you have to include the .exe file in the usb?
And, by the way, are you happy with this software?.
Thank you!!!
Also, I suppose that you have to include a dll into the software folder. Do you have to include the .exe file in the usb?
And, by the way, are you happy with this software?.
Thank you!!!
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
You do need to include the DLL in the folder where your exe is.
You do not need to add anything to the usb drive, just use the make program to set it as a valid key and that's all you need to do the the usb drive.
Note: the usb drive can still be used as a regular drive, you can copy and delete files as normal.
>>Am I happy with the software<<
Antonio and I are still working out some Fivewin code setup.
What I have tested so far is very promising.
Once the final changes have been completed we will post the code here.
You do not need to add anything to the usb drive, just use the make program to set it as a valid key and that's all you need to do the the usb drive.
Note: the usb drive can still be used as a regular drive, you can copy and delete files as normal.
>>Am I happy with the software<<
Antonio and I are still working out some Fivewin code setup.
What I have tested so far is very promising.
Once the final changes have been completed we will post the code here.
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
-
- Posts: 67
- Joined: Thu Jan 05, 2006 10:35 pm
- Location: Canada
- Contact:
I found this vb6 code on the net. I tested it here under xp home, xp pro and vista and it returned the usb memory drive info. Id does not work on win98.
If anyone can translate this vp6 app we could all use usb memory drives as software protection keys.
Private Sub Form_Load()
Dim colProcessList
Dim objprocess
Set colProcessList = GetObject("Winmgmts:").ExecQuery("Select * from Win32_DiskDrive ")
For Each objprocess In colProcessList
If Mid(objprocess.PnPDeviceID, 1, 7) = "USBSTOR" Then
List1.AddItem objprocess.PnPDeviceID
End If
Next
Set colProcessList = Nothing
Set objprocess = Nothing
End Sub
This would make one of the simplest and inexpensive software protection methods around. The thought is - save the usb drive info to an encrypted dbf file that is already in your software package, preferably a file that holds a lot of setting for your application. Then on startup check the key.
You will have to select usb ram drives carefully not all have serial numbers.
Any thoughts or comments appreciated.
Mike Buckler
If anyone can translate this vp6 app we could all use usb memory drives as software protection keys.
Private Sub Form_Load()
Dim colProcessList
Dim objprocess
Set colProcessList = GetObject("Winmgmts:").ExecQuery("Select * from Win32_DiskDrive ")
For Each objprocess In colProcessList
If Mid(objprocess.PnPDeviceID, 1, 7) = "USBSTOR" Then
List1.AddItem objprocess.PnPDeviceID
End If
Next
Set colProcessList = Nothing
Set objprocess = Nothing
End Sub
This would make one of the simplest and inexpensive software protection methods around. The thought is - save the usb drive info to an encrypted dbf file that is already in your software package, preferably a file that holds a lot of setting for your application. Then on startup check the key.
You will have to select usb ram drives carefully not all have serial numbers.
Any thoughts or comments appreciated.
Mike Buckler
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Code: Select all
FUNCTION MAIN()
LOCAL oLoc := CREATEOBJECT( "wbemScripting.SwbemLocator" )
LOCAL oSrv := oLoc:ConnectServer()
LOCAL oJbs := oSrv:ExecQuery( "SELECT * FROM Win32_DiskDrive" )
LOCAL oJob
FOR EACH oJob IN oJbs
// IF SUBSTR( oJob:PnPDeviceID, 1, 7 ) = "USBSTOR" Then
? oJob:PnPDeviceID
// ENDIF
NEXT
INKEY( 0 )
RETURN NIL
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 67
- Joined: Thu Jan 05, 2006 10:35 pm
- Location: Canada
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 67
- Joined: Thu Jan 05, 2006 10:35 pm
- Location: Canada
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
This code detects the USB pendrives. Next step, get their IDs
Code: Select all
#include "FiveWin.ch"
#define DRIVE_REMOVABLE 2
function Main()
local nBitDrives := GetLogicalDrives(), n, cDrive
for n = 1 to 32
if lAnd( nBitDrives, 2 ^ ( n - 1 ) )
cDrive = Chr( Asc( "A" ) - 1 + n ) + ":\"
if n != 1 .and. GetDriveType( cDrive ) == DRIVE_REMOVABLE
MsgInfo( "USB pendrive: " + CRLF + cDrive )
endif
endif
next
return nil
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
HB_FUNC( GETLOGICALDRIVES )
{
hb_retnl( GetLogicalDrives() );
}
HB_FUNC( GETDRIVETYPE )
{
hb_retnl( GetDriveType( hb_parc( 1 ) ) );
}
#pragma ENDDUMP
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: