Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when acessing winsock
Message
From
16/12/2003 15:13:04
 
 
To
16/12/2003 15:01:02
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00859548
Message ID:
00859625
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
?? So this code send you invalid container message?
oForm = CREATEOBJECT("Form")
oForm.NewObject("MSCTRL1","OC1")
oForm.MSCTRL1.Visible=.T.
oForm.Show(1)
DEFINE class OC1 as olecontrol
         OleClass = 'mswinsock.winsock'
ENDDEFINE
Perhaps you are missing subclass the Winsock control into an OleControl Class.

>ja i know, but originaly i did:
CREATE('mswinsock.winsock')
>then i tryed:
oSock = NewObject("_WinSock", This.ClassLib)
(this one wouldn't do it because "Invalid container")

>and then i tried:
>ThisForm.AddObject()

>i don't think there is another one, or am i missing something here?

>i even went and manually unregistered and registered the .ocx with no success.



>In the KBArticle say you can't use AddObject. Use NewObject instead.
>
>"Add the control you want to use into a class that is saved in a Visual Class library or into a class created with the DEFINE CLASS command. Next, add an instance of the class at run-time instead of adding the control. Please see the MORE INFORMATION section for details."
>
>Hope this helps.
>
>>Thank you for your reply
>
>>that did not do the trick. i just test it by creating a class of winsock, then instantiating the class with ThisForm.AddObject().
>
>>i still get the same error.
>>BUG: License Error with ActiveX Control Added at Run-Time
>>
>>http://support.microsoft.com/?scid=192693
>>
>>
>>Hope this helps
>>
>>>hello everybody
>>
>>>i know i have seen this beeing discussed here at Universal Thread before - just can't remember where it was.
>>
>>>when trying to send e-mail via winsock i get the following error:
>>
>>>OLE error code 0x80040112: Class is not licensed for use.
>>
>>>it works fine on my developer machine but on another winXP it does not. if i remember correctly it was an install problem, right?
>>
>>>i have my own homemade install routine which registers/proccesses ocx/dlls. i gues it does not do it correctly. what should i be looking for, and what 'testing' routine could i include in my install to ensure correct installment?
>>
>>thanks for all your help as always!
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform