Component licenzing


Is there any way to implement licenzing for COM+ *.dll components , developed in Visual basic?

Any suggestions appreciated.
andris333Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MattiConnect With a Mentor Commented:
Just thinking that adding files or registry entrys don't be enough to protect aginst those who have free access to server.

Only is use connection to own server and send IP or domain name after resolveing it on " component side and  prevent or allow component to run.

So need a server and there an app to listen a port and look against IP or domain database.
And in component code to resolve IP or domain and make a connection to server
There are a lots of VB sample codes these both apps.

This would be sure way to get info from all copies running, it will slow of cause.

Matti
0
 
MattiCommented:
My is a little oldfashion way to use .lic-file control don't go to design mode whit out the lic-file found from controls path. Redistribution whit exe app don't require this lic-file.

Private Sub UserControl_InitProperties()
On Error Resume Next
Dim Sline$, i&
Open App.Path + "\MyCtrl.lic" For Input As #1
Line Input #1, Sline
If Sline <> "123asd897124adhshgasdlkja98546pwer842571239081238099fsdkl009asd43289" Then
MsgBox "Sorry! Can't found the licence file to use this control in desing environment!"
Stop
End If
Close #1
End Sub
0
 
x50FadeCommented:
Do you want to prevent some other developer from stealing your functionality in your dll, or do you want to prevent applications from accessing it if they are not licensed?
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
andris333Author Commented:

Actually I want to both. But the most important for me is to prevent applications from accessing it if they are not licensed. My application in a specific VB COM+ project running form asp.

0
 
x50FadeCommented:
What I do is to just create an extra Variable in each function declaration...sort of acting like a password...

So in order to call the function, you have to pass it the right "password"

Hope this helps
0
 
andris333Author Commented:

You mean different password in EACH function?

Is it right in this sample code:

Function aaa(byVal simpleVal, byVal Password)

if Password<>"FFF" Then Exit Function

' ... code here

End Function
0
 
x50FadeCommented:
Yup, that's what I do....works ok but I also wrote my own DLL to manage my licensing of my apps....I only use the above mentioned method to protect my dll so that no-one else can use it to protect their software if they don't have the propper "password"
0
 
andris333Author Commented:

Ok, but where do you store the password? If somebody could get it, this dll could be potentially installed and used somewhere else?
0
 
x50FadeCommented:
The password is stored in the DLL itself.....Someone who knows it WILL be able use the DLL, hence I'm the only one with the password...SO i'm the only one using it...

P.S. What if someone steels (get's ahold) of your bank pin number??? Same thing
0
 
andris333Author Commented:

Well, I still don't get it.
For example, I have a class class1 and  a function function 1.

Function function1(byVal simpleVal, byVal Password)

if Password<>"FFF" Then Exit Function

' ... code here

End Function

Then I call this function from asp like:

aaa = somecreatedobject.function1("simpletext", "FFF")

So someone who sees asp file source could steal my pwd. Am I right?







0
 
x50FadeCommented:
Yes you are right...I apologise for not reading your second post more carefully....

With ASP this might pose a problem, cause it does not get compiled...

I do normal EXE apps so mine gets compiled and no-one can see my source
0
 
andris333Author Commented:

So I need to refer to our server 80 port to check if a license is aviable for a computer that has application installed? And what if domain name changes?

Btw: Could you post some links how it could be done?
0
 
MattiCommented:
Not port 80, select another.

To start here is some:

Server side:
a sample how to use Wininet API:
http://www.freevbcode.com/ShowCode.Asp?ID=856

Get IP
http://vbnet.mvps.org/code/network/ipaddress.htm

Get domain name:
http://www.freevbcode.com/ShowCode.Asp?ID=393

Convert an IP address to a Long Integer for API Calls
http://www.freevbcode.com/ShowCode.Asp?ID=4189

Client, dependence the conditions but an app listening port and the database or list of valid users.

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20285573.html?query=Listen+port&topics=93

Matti
0
 
andris333Author Commented:

But if a client has a firewall, it would be possible to detect that I am sending some info to web if I won't use 80 port?
0
 
MattiCommented:
In this case your app would be on server and you can document that port you have there,  the firewall problem is on the other side but if it's on your control the use 80.

Matti
0
 
andris333Author Commented:

Ok,

So I need a VB license control application on server that would listen to a specific port and a special functions in software that would call my server port. Every time an application would start on different computer, it would send some info to a server where vb license control application runs. Vb license control application would that check a license key and make an answer to a call. Am I right?
0
 
andris333Author Commented:

Hi again,

I solved my problem already. Thanx for your help Matti.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.