Solved

Distributing DLL's for Sale (VB6)

Posted on 2012-04-08
15
709 Views
Last Modified: 2013-11-25
Hello,

Wondering if anyone has a "code" solution on how to distribute COM DLL's compiled with VB such that they can be licensed. Licensing COM objects appears to be VERY different from Licensing an ActiveX object.

To clarify, some examples are (pretty much every COM/DLL reseller on the planet like XceedSoft, WeOnlyDo, etc).

Object works like this:

License / Key can be purchased from Said company, so it is something that can be generated server side.
Object has a function called  .License() which accepts one or two parameters (depending on system) which are "Name" and "License Key" or just "License Key"

Upon successful call of this ONCE (and then you can remove it  from your code), the component is then licensed to the developers PC permanently.

After which, any projects the developer adds the component to, can be compiled and distributed without ever calling the .License function again, and without any trial messages/etc on the client side.

If however, the .License function was NEVER called, then all distributions will then show the "trial" message on the developer PC AND on all client machines the component was distributed to.


======================================

Now, for whatever reason, what should have an abundant source of documentation, seems to be a complete mystery and/or closely guarded secret.  I am thinking NOW that VB6 is officially no longer in distribution, that someone who has EVER implemented a license mechanism (NOT Wrapper code like SoftLocx, etc) would be so kind as to cough up the details --- PLEASE!!!

Thanks.
0
Comment
Question by:microvb
  • 8
  • 2
  • 2
  • +1
15 Comments
 
LVL 3

Author Comment

by:microvb
ID: 37840792
It would seem that the community at large doesn't wish to give up this information --- not sure whats so special about it, but I am gonna close this as unresolved as this is one question that will NEVER be answered.

Sadly, there is a solution, but sorry EE, your not "special" enough to host it apparently.

Cheers and to the dev community hoarding the solution ---- GO SUCK A CAMELS NOSE!!
0
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 37845180
If somebody was willing to help you out (and the lack of response isn't just a result of narrow question categorization), I don't know that your attitude is going to help you get it answered. Just saying.

Anyways, I've never implemented a license scheme like this on a VB6 component, but have you tried contacting one of the companies that sells a component licensed like this and seeing if you can get in touch with somebody who you know has done it? I know the company wouldn't officially support helping you, but maybe you can get in touch with one of their developers and ask (nicely) to be pointed in the right direction. If people have been doing this for 15 years (how long modern VB classic has been around), I'm sure there are plenty of people who have done it. It's amazing what a friendly phone call and some flattery can do - I'd be hard pressed to turn down somebody who contacted me and asked for some assistance with something I'd done before, especially if published knowledge is legitimately light.

Maybe you're just frustrated from the lack of easy to find knowledge and you've been searching for a while, but I doubt it's a closely guarded secret, since there are dozens of components that are licensed in this way, so it's not proprietary. My point is that the attitude isn't going to help find an answer.
0
 
LVL 3

Author Comment

by:microvb
ID: 37845612
@ryanmccauley,

Thanks for the tip, however I have contacted several of these companies. Some with no reply at all -- others won't give it up because it has to do with their licensing, claiming security blah blah ..... and some other companies are like sure, we can write a component that will do it for $30,000+ ...  etc.

I am sure if you did even a bit of digging through all the popular source repo's, including some of the newer ones, you too will be unimpressed with the results.

My attitude you see in the post above, was really just a response to the lack of response --- everywhere, when a politely written article that details things out in such a way that reduces such random comments like:

1. It's not possible.
2. Have you tried XYZ wrapper.
3. Why aren't you using .NET   (aka... same problem is posed there for distribution of COM objects).
4. Use  "Licenses.Add"
5. .... insert other non-useful comment here.

I respect that people give there time to hail responses, and time is valuable --- just sort of felt that my contributions to the community aren't exactly small --- for free.

I know there is a solution, and yes, it does seem to be something closely guarded, which when i responded to the thread -- that is the honest to god's answer to this question. ---- There is no solution because it is not being given out by anyone.

Not sure what the big deal is about this --- the community at large could use this and it would perhaps spurt some more life into current products.

In any case -- I am not super keen on those who hoard information --- especially not in this era, and the amount of information I have given freely into the community.
0
 
LVL 18

Accepted Solution

by:
p912s earned 500 total points
ID: 37848595
>>"Cheers and to the dev community hoarding the solution ---- GO SUCK A CAMELS NOSE!!"
That's totally uncalled for. Sorry if the companies you contacted ignored you, and you felt ignored after only a couple of days here without an answer, but maybe, just maybe the person you needed to read this and provide an answer was busy. And after they read your comments they'll just move on now instead of helping...

That said, don't know if this helps or not, but here it is:

Have you looked into this?
  http://www.vb-ware.com/vbware/licensedllvb6.htm
It's only $60 and you don't need to reinvent the wheel....

Or have you seen this?
  http://support.microsoft.com/kb/274754
The process talks about ActiveX, but they are doing this in VB so I'm sure you could adapt to your dll.

HTH

Scot
0
 
LVL 3

Author Comment

by:microvb
ID: 37849284
@p912s

I agree it was uncalled for, and was the result of angry typing.

The $60 solution seems worthwhile to look into. The downside looks like like it requires manual generation of the license keys. Will look into it deeper.

As for the microsoft solution, yes, I have seen that in many places -- a $250 call to Microsoft confims that is only applicable to ActiveX (.OCX) components and for DLL's it is a different method which they did not disclose or even a reference to documentation.
0
 
LVL 15

Expert Comment

by:eemit
ID: 37849316
Hi microvb,
Take a look at this MS article:
IClassFactory2 interface
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 3

Author Comment

by:microvb
ID: 37855339
@eemit : Unfortunately due to the way automation works in VB, those classes are unavailable --- additionally, there is very little (no more than a few lines, or a list of the functions) available.

@p912s : See attached image for the result of my purchase of vb-ware.com's application. My bad as I should have tested it before buying, but, at least PayPal has a decent refund process. Tried to use their contact form (broken), and there doesn't seem to be any other way to get in touch with them.
vb-ware.png
0
 
LVL 3

Author Comment

by:microvb
ID: 37855352
Following up, can force the DLL to register using administrator command prompt, however, it comes up with an automation message afterwards --- all run-times are installed.


 
Success on forced registration of DLL
Demo application or USE of DLL still fails with an automation error.
0
 
LVL 15

Expert Comment

by:eemit
ID: 37856547
Hi microvb,
Demo application or USE of DLL still fails with an automation error
On a 64-bit version of a Windows operating system, there are two versions of the Regsv32.exe file
The 64-bit version is %systemroot%\System32\regsvr32.exe
The 32-bit version is %systemroot%\SysWoW64\regsvr32.exe

(The Syswow64 folder contains the 32-bit versions of Windows program files and DLLs)

Run Regsvr32.exe from the %SystemRoot%\Syswow64 folder.
For example, type the following commands to register the DLL

cd \windows\syswow64
regsvr32 c:\filename.dll

You also need 'Run as Administrator'.
0
 
LVL 3

Author Comment

by:microvb
ID: 37857188
Executing the following in an Administrator command prompt results in nothing registering.

C:\Windows\SysWOW64>regsvr32 "c:\Program Files (x86)\VBWare\License DLL\VBWareLicenseDLL.dll"

Open in new window


64bit RegSvr32 fail example
I do appreciate the feedback, however this is another great example on how junk these programs are. They always fail at some point ---  This particular one, would result in a very poor user experience from the perspective of dependence on a DLL which has a poorly constructed container.

This is why I was looking more towards a code only solution to this problem using a set of API's that is accessible to VB. I have no issues with any of the DLL's that I create registering on systems from 95, through to Windows 8. (By no issues, I mean, they run fast, no mem leaks, and all register correctly when used -- in fact, they can operate without registration when placed in the same folder as the application which require it -- thus bypassing dependancy nightmares of previous OS's).

Thank you for reminding me about the x64 version of regsvr32. If I am not mistaken, on Windows 7, using c:\windows\system32\regsvr32.exe will call c:\windows\syswow64\regsvr32.exe  where required by 64bit components. Since this is not a 64bit component, it goes without saying that is most likely the reason it did not register with c:\windows\syswow64\regsvr32.exe .... it did register with c:\windows\system32\regsvr32.exe .

I also tried the old trick of placing the runtime inside the application folder, and further, disabling UAC in an attempt to troubleshoot (something I would not be able to request for people to do --- my COM will operate fully with UAC enabled).

This leads to another frustrating point --- clearly the developers of these wrappers / external components are not very skilled (resulting works as proof), so it really irks me that this information has been made available to them.

Feelings aside, it would be fantastic to find a final solution to this decade long issue. It may sound like I am simply shooting down your comments -- I can assure you this is not the case. I am most definitely a skilled coder with over 30 years experience, to which a solution to this problem has eluded me.

Today (not as in immediately today, but  as definition of an era), I hope we can work together to find a viable solution. I am also looking into this in my space time, and having multiple sets of eyes on the prize, there should be no reason to find a solution given that one actually does exist :)

Dan.
0
 
LVL 3

Author Comment

by:microvb
ID: 37876118
I was able to contact the provider at VBWare and they have resolved the issue with the component as there was a glitch in the compile.

VB-Ware looks to be a viable solution so I will close this off and mark the points out accordingly.

Thank you to everyone for your responses.
0
 
LVL 3

Author Closing Comment

by:microvb
ID: 37876123
The correct answer and final solution is: "Have you looked into this?
  http://www.vb-ware.com/vbware/licensedllvb6.htm
It's only $60 and you don't need to reinvent the wheel...."

The other URL "http://support.microsoft.com/kb/274754"  is ONLY for ActiveX (OCX) and can not be implemented into COM (DLL) or Applications (EXE).
0
 
LVL 18

Expert Comment

by:p912s
ID: 37876526
microvb - good to hear they responded to you and were able to correct the problem.

Good luck and thanks for the points!

Scot
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now