Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"Class is not licensed for use"

306 views
Skip to first unread message

Nicolas

unread,
Oct 28, 2002, 12:20:01 PM10/28/02
to
Hi,

I wrote the following ASP script:
<%
Set oMySock = CreateObject("MSWinsock.Winsock.1")
%>

When I run it on my computer (Windows 2000 Pro, Visual Basic 6.0 SP5) it
works fine.
But when I try to launch it on two other machines (Windows 2000 Server and
Advanced Server, without VB6 installed) it fail, and I got the following
error message:
---
error '80040112'
Class is not licensed for use

/nico/testsocket.asp, line 2
---

I look on MSDN and on Google. I found the Q194751 information which says
that there are license problems with some VB 6 components. Microsoft gives a
small app (VBC6.EXE) which correct theses problems.
I try to run it on my computer, with success.
I try to run it on the two others, but it fails because it doesn't found VB6
(however in the README.TXT file of the VBC6.EXE, it is just said that VB6
Run-time only is needed).
I try to install the VB6 runtime, VB6 SP5 runtime, copy a lot of
MSWINSCK.OCX found on Internet without success.

The strange thing is that it fails under ASP environment (Using
CreateObject), but when I create a project with VB6, using the WinSock
component (Listed in the "Components" box), it works !
But when I do a CreateObject() in Visual Basic I got an error: "ActiveX
Component can't create object".

Can someone help me ?

Thanks,

Nicolas


Alex Dybenko

unread,
Oct 28, 2002, 1:16:58 PM10/28/02
to
in order to create new instance you need a design license, which installed
only with VB(VS)
not sure how you can use it in ASP, but in VB you can try to use
Licenses.add method

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com


"Nicolas" <ly...@wanadoo.fr> wrote in message
news:3dbd71ad$0$7113$4d4e...@read.news.fr.uu.net...

Nicolas

unread,
Oct 29, 2002, 5:44:07 AM10/29/02
to
Hi,

Thanks for your answer.

I look the documentation for the Licenses collection and I understood
the thing.
The problem is that the Licenses collection seems to be unaivailable in
ASP !!

I try to create a VB project with an License.Add "MSWinsock.Winsock" and
it fails on my two computers, saying that it is not necessary to add
components that aren't licensed...

Any other solution ? Is there a way to tell IIS to automatically add
licenses to components in scripts, maybe ?

Thanks,

Nicolas

"Alex Dybenko" <al...@PLEASE.cemi.NO.rssi.SPAM.ru> a écrit dans le message
news: uQU3A5qfCHA.1652@tkmsftngp09...

Nicolas

unread,
Oct 29, 2002, 12:38:02 PM10/29/02
to
Hi,

I found a solution, if this interess someone...
I created a ActiveX component in VB, called "DummyWinsock".
On this component I inserted a Winsock control, and in the
"Declarations" part of the user control (Called ctlDummyWinsock) I just put:
Public objWinSock As MSWinsockLib.Winsock

Then I implemented the following method:

Private Sub UserControl_Initialize()
Set objWinSock = Winsock
End Sub

After that, I installed and registered the component on my 2 computers.
In my ASP script, I just had to do the following:
<%
Set oDummySock = CreateObject("DummyWinsock.ctlDummyWinsock")
Set oSock = oDummySock.objWinSock
%>

The "oSock" object is now pointing on a valide WinSock component, and it
works, without these strange licenses problems...

Regards,

Nicolas

"Nicolas" <ly...@wanadoo.fr> a écrit dans le message news:
3dbe665d$0$12228$4d4e...@read.news.fr.uu.net...

Klaus Oberdalhoff [MVP]

unread,
Oct 29, 2002, 5:20:58 PM10/29/02
to
Hi,

thanks for the info. Good idea (for other things as well)

--
mfg

Klaus Oberdalhoff [MVP]

David Stockwell (IndX)

unread,
Nov 4, 2002, 7:09:21 PM11/4/02
to
I have the same problem in Microsoft Access 2000.

I have MS Access installed on a Win2k Professional machine, and do not have
VB6 installed but VB.Net. The program that re-registers the controls looks
for a VB6 license, does not find one, and fails. Yet, the controls should
be licensed through the MS Access license.
Any clues?

DS
"Klaus Oberdalhoff [MVP]" <ko...@gmx.de> wrote in message
news:apn1mi$h5s$04$1...@news.t-online.com...

Ron Hinds

unread,
Nov 5, 2002, 3:49:14 PM11/5/02
to
"David Stockwell (IndX)" <davidst...@indxhq.com> wrote in message
news:ea5ht9FhCHA.1712@tkmsftngp11...

> I have the same problem in Microsoft Access 2000.
>
> I have MS Access installed on a Win2k Professional machine, and do not
have
> VB6 installed but VB.Net. The program that re-registers the controls
looks
> for a VB6 license, does not find one, and fails. Yet, the controls should
> be licensed through the MS Access license.
> Any clues?
>
> DS

Look for files named the same as your OCX, but with the extension "SRG".
Make a copy of these files, and rename the copy to the same name with the
extension "REG". Now double-click those REG files and answer "Yes" when it
asks if you want to add the information to the Registry.


0 new messages