Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinSock .... Urgent.
Message
From
18/08/2004 17:43:22
 
 
To
18/08/2004 12:12:35
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00934157
Message ID:
00934285
Views:
19
--loWinsock = CREATEOBJECT("MSWinsock.Winsock")
lcIp = loWinsock.LocalIP

I tested this code on developer machine (OS : xp), and after i compiled my app, and i executed into another (Win98) machine. I copied Mswinsck.ocx in \windows\system and i registered with REGSVR32 with succes. When this rutine was called, i received next error:

Ole error code 0x80040112 Appropriate license for class not found--

The License it is after is one allowing you to instantiate the Winsock as an object in its own right. You only have this license if you have VFP installed on the machine you are running the exe on. Since this will not be the case on the "other" PC that is your problem.

The object can only be used on a form in the way you are using it. I got around this by having a class that was a form (invisible) with the Winsock on it.

Then you can do

loWinsock = createobject("MyWinSockForm")
lcIP = loWinsock.Winsock1.LocalIP

Andrew R.
Previous
Reply
Map
View

Click here to load this message in the networking platform