Results 1 to 6 of 6

Thread: convert to variant

  1. #1

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919

    convert to variant

    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?
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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++
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    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++
    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
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  4. #4
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Winsock aside, since you are using automation, try readin this discussion about Variants

    http://msdn.microsoft.com/library/de...chap7_9dir.asp

  5. #5

    Thread Starter
    Fanatic Member nabeels786's Avatar
    Join Date
    Jul 2001
    Location
    New York
    Posts
    919
    i didn't have automation checked in the wizard, should i enable it?
    Visit www.fragblast.com
    Gaming, forums, and a online RPG/Battle system




    (__Flagg) DOT NET? is this a Hindi Dating service?

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width