Link to home
Start Free TrialLog in
Avatar of cisDK
cisDK

asked on

Winsock Control License ???

This code snippet wont work on a customer's machine, even though i distribute i correct ocx's and dll's; (The Microsoft Winsock Control 6.0 is not referenced, and should not be in my case).

----Form1.Frm---

Option Explicit

Private mConn as Object

Private Sub Form_Load()
    Set mConn = CreateObject("MSWinsock.Winsock")
    .
    . e t c
    .
End Sub

--

As the title states, the difference seems to be that on my developer machine with Visual Studio 6.0 SP3 i have a license for the Winsock Control - but the customer machine doesnt...

Is it possible to use "Licenses.Add "MSWinsock.Winsock", "<LicenseKey>" to allow for this dynamic creation - and if so, where do I find the key?!??!?

If I copy the key HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d to the target machine, then my application runs ok!!

/C
Avatar of gre
gre

what is the error thrown?

I had a similar problem with an activeX control, where I also used CreateObject.
I got an error like "could not create activeX component" when I ran on a different
box than my dev box.

The problem was that the dll was not registered. I had all the right dll's and ocx's,
but the most recent ones have to be registered.

(On NT) you can do it manually by running regsvr32 <ocx or dll name>

Have you tried shelling out to dos and using the regsvr32 command to register that winsock control on the end user's computer. I have never done any of these CreateObject but as I see it maybe the installation program will not register the control since it's not referenced in the program?
Avatar of cisDK

ASKER

Thanks for your comments!

The winsock control is registered correctly at target machine, so thats not the problem.

If I copy the key HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d to the target machine, then my application runs ok!!
Avatar of cisDK

ASKER

Edited text of question.
That the difference between the runtime license and a design time license.
You are binding it on runtime and therefore it assumes a run-time license...
Avatar of cisDK

ASKER

My question is still,

Is it possible to use "Licenses.Add "MSWinsock.Winsock", "<LicenseKey>" to allow for this dynamic creation - and if so, where do I find it?

No, you have to pay Microsoft..
Avatar of cisDK

ASKER

Yes I will probably have to pay Microsoft again, if that license if not provided with my VS6 license...

Or create a winsock component myself (How hard can it be?! :)

Install VB6 will work. VB6 gives you a design time license
You app uses CreateObject for a control.
A control might consider you a designer and expect to see a design time license.  (VB6 installs design time licenses)
When it cannot find one it will give an error.
Avatar of cisDK

ASKER

However, I cannot install VB6 on all customer machines...

So...
The fact that you cannot install VB doesn't make my answer wrong...
You have to buy licenses in that case...
Avatar of cisDK

ASKER

Rite... To summarize my question;

> Is it possible to use "Licenses.Add "MSWinsock.Winsock", "<LicenseKey>" to allow for <> dynamic MSWinsock creation

Your answer is no? - I believe you are wrong - so...

I don't know anything about
Licenses.Add "MSWinsock.Winsock", "<LicenseKey>"
I dont know if this has anything to do with your comments but i am having a problem along the same lines.  When I try to add a Winsock control in the form I get the nasty hate not that says "License information for this component not found.  You do not have an appropriate license to use this functionality in the design environment."  what does this mean, and can anyone help me?
Avatar of cisDK

ASKER

Yes, master01 you're probably missing the designtime reg key:

HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d

I put that in but Vb4.0 standard still says that message.  I think i need the alpabetic key besides the reg key.
Avatar of cisDK

ASKER

Yes, but that is copyrighted information. So we cant post it here, but leave your email address and i'll email it to you.

Thanks for the help.  I got the answer from someone on irc. thanks a lot
ASKER CERTIFIED SOLUTION
Avatar of sennaspy
sennaspy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
For all,

To activate the MSWinsock.winsock ActiveX control add following registry key in registry :

[HKEY_CLASSES_ROOT\Licenses\2c49f800-c2dd-11cf-9ad6-0080c7e7b78d]
Default="mlrljgrlhltlngjlthrligklpkrhllglqlrk"

This is not registred by default.