I wanna convert a char * and a int into different variants so the winsock control will accept them, but any typecasting I try doesn't work..
Any ideas?
Printable View
I wanna convert a char * and a int into different variants so the winsock control will accept them, but any typecasting I try doesn't work..
Any ideas?
Why are you using the winsock control? Easier to use the normal socket functions, I would have thought.
Plus ActiveX is a bastard with C++ :p
Well, I don't exactly know how to use the other one.Quote:
Originally posted by parksie
Why are you using the winsock control? Easier to use the normal socket functions, I would have thought.
Plus ActiveX is a bastard with C++ :p
I've read in tutorials and stuff, but what do I do to like, catch when data comes in/connection attempt etc. I know there's functions for those, but I don't know how to use it, basically
Winsock aside, since you are using automation, try readin this discussion about Variants
http://msdn.microsoft.com/library/de...chap7_9dir.asp
i didn't have automation checked in the wizard, should i enable it?
If this is MFC, yes definitly.
In MFC you can also take advantage of the COleVariant class.
No MFC but VC++ you can use the _variant_t class, which is IMO better than COleVariant. It's in some strange header, look it up in the reference.