Click to See Complete Forum and Search --> : convert to variant
nabeels786
Sep 19th, 2002, 02:03 PM
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?
parksie
Sep 19th, 2002, 02:05 PM
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
nabeels786
Sep 19th, 2002, 03:12 PM
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
Well, I don't exactly know how to use the other one.
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
jim mcnamara
Sep 20th, 2002, 09:19 AM
Winsock aside, since you are using automation, try readin this discussion about Variants
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap7_9dir.asp
nabeels786
Sep 20th, 2002, 03:54 PM
i didn't have automation checked in the wizard, should i enable it?
CornedBee
Sep 24th, 2002, 07:15 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.