> Hi Stefan
> VFP seems dont make any difference between oleclass "MSWInsock.winsock.1" and "MSWinsock.Winsock" ?
> If upload the winsock.ocx on a form the oleclass is :"MSWInsock.winsock.1"
> But with a prg can build the form with the ocx for the two names without any returned error !
>
Salut Yousfi -
COM servers are defined in the Windows Registry (in HKEY_CLASSES_ROOT).
The convention there is that a "master" class like CreateObject("MSWinSock.WinSock") can have different versions,
so that the "default" would be defined in the CurVer key of the master class, but you can still explicitly
CreateObject() any (older) version if you want, say because you want to make sure that future updates do not
break your code.
So perhaps 'VisualFoxpro.Application' would be a good example assumed you have various Vfp versions installed,
Vfp6, 8 and 9 among them, and the most recent Vfp9 was installed last:
o = CREATEOBJECT('VisualFoxpro.Application')
? o.Version && 9.0
o = CREATEOBJECT('VisualFoxpro.Application.8')
? o.Version && 8.0
o = CREATEOBJECT('VisualFoxpro.Application.6')
? o.Version && 6.0
hth
-Stefan