General information
Category:
ActiveX controls in VFP
--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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only