Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. VARIANT CONVERSION TO SPECIFIC CLASS TYPE POINTER

VARIANT CONVERSION TO SPECIFIC CLASS TYPE POINTER

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lavate malllik
    wrote on last edited by
    #1

    how to convert VARIANT to a specific class type pointer. Mallikarjun

    C 1 Reply Last reply
    0
    • L lavate malllik

      how to convert VARIANT to a specific class type pointer. Mallikarjun

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Why do you want to do such a thing ? How did you 'initialize' your VARIANT ? And BTW, don't use VARIANT, that's bad ;P


      Cédric Moonen Software developer
      Charting control [v1.1]

      S 1 Reply Last reply
      0
      • C Cedric Moonen

        Why do you want to do such a thing ? How did you 'initialize' your VARIANT ? And BTW, don't use VARIANT, that's bad ;P


        Cédric Moonen Software developer
        Charting control [v1.1]

        S Offline
        S Offline
        Stephen Hewitt
        wrote on last edited by
        #3

        Cedric Moonen wrote:

        And BTW, don't use VARIANT, that's bad

        Why are VARIANTs bad?!?

        Steve

        C 1 Reply Last reply
        0
        • S Stephen Hewitt

          Cedric Moonen wrote:

          And BTW, don't use VARIANT, that's bad

          Why are VARIANTs bad?!?

          Steve

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          Yes you're right, I was a little bit too 'extreme' in my answer. In fact, it is because I saw people using it to circumvent C++ type safety (to "make life easier"). That was quite scary...


          Cédric Moonen Software developer
          Charting control [v1.1]

          S 1 Reply Last reply
          0
          • C Cedric Moonen

            Yes you're right, I was a little bit too 'extreme' in my answer. In fact, it is because I saw people using it to circumvent C++ type safety (to "make life easier"). That was quite scary...


            Cédric Moonen Software developer
            Charting control [v1.1]

            S Offline
            S Offline
            Stephen Hewitt
            wrote on last edited by
            #5

            Cedric Moonen wrote:

            I saw people using it to circumvent C++ type safety (to "make life easier"). That was quite scary...

            I agree with that. I've seen this before too. Specifically people casting pointers to C++ classes to longs and storing it in a VARIANT and passing it through COM interfaces; talk about missing the point of COM.

            Steve

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups