>Thanks
>Kev
This works in the development environment but usually not in a distributed application. the reason for this is that Createobject requires a development license for MSWinsock. This is installed with Visual Studio (or one of the individual products contained within - VFP, VB, etc.). Most user machines don't have these loaded so the Createobject will fail with a licensing error.
To avoid this, embed MSWinsock in a form and distribute it that way. The run-time license will be embedded in the SCX itself and MSWinsock won't balk during instantiation.
You could also subclass the OLEControl. The same license information is embedded in the VCX. However, because the object is an OLEControl, there is a workaround for using the subclass in code. You have to add it to a form at run-time. The following might work:
oform = createobject('form')
oform.Newobject('owinsock','mywinsockclass','mywinsockclasslibrary')
? oform.owinsock.LocalIP
oform.release
release oform
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao