what is a dep file.
an activex dll is distributed with my application.
is there any way to restrict others to use that component
( my activex dll) in their own applications
is dep file of some help ?
Thanks
Printable View
what is a dep file.
an activex dll is distributed with my application.
is there any way to restrict others to use that component
( my activex dll) in their own applications
is dep file of some help ?
Thanks
The dependancy file is used by VB Package and deployment utility to tell it what other components an ActiveX dll, exe or whatever needs to function properly. It has nothing to do with security or access to a component so it couldn't be used for that purpose.
I am sure there are lots of ways to 'lock' a dll, if you were using an ActiveX control then you could do it through the license key. One simple way is to make the classes in your dll only work after a password of some kind has been passed in. Then since you know the password you can pass it in when it is used by your apps where as they wont know it and thus wont be able to use the dll.
VB Code:
'inside the classes Private m_Authenticated as boolean Public Sub Authenticate(AuthCode as string) If AuthCode="IBetYouWontFigureThisOut" then m_Authenticated=True End Sub 'then add a check for this variable in any other methods or properties Public Property Let Name(Newvalue as string) If m_Authenticated=False then Err.Raise 1,,"You silly billy you didn't authenticate!" Exit Property End If 'normal stuff here End Property
It's far from the best but it'll do if you are in a pinch.
You need to add licensing support to your control project
On the Project menu, click <MyProject> Properties to open the Project Properties dialog box. Select the General tab, check Require License Key, then click OK.
When you make the .ocx file, Visual Basic will create a .vbl file containing the registry key for licensing your control component. When you use the Package and Deployment wizard to create a setup for your .ocx, the .vbl file is automatically included in the setup procedure.
If you don't want an end user to use your control in the development environment then you don't distribute the vbl file.
Slaine, He means for a DLL not a control.Quote:
Originally posted by vishalmarya
an activex dll ...( my activex dll)
In that case completely ignore everything I said :)