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. activex problem

activex problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comhelp
6 Posts 4 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.
  • S Offline
    S Offline
    satadru
    wrote on last edited by
    #1

    hi , i have created an activex control in vb. in one of the method the user passes the file path to the control. in vb i used string to get the file path... now in vc++ when i insert the control its been declared i.e the string variable is been declared as BSTR* filepath...so i cant pass the variable which i am capturing as a CString. What is the problem??? Thanking you. Satadru.

    M M 2 Replies Last reply
    0
    • S satadru

      hi , i have created an activex control in vb. in one of the method the user passes the file path to the control. in vb i used string to get the file path... now in vc++ when i insert the control its been declared i.e the string variable is been declared as BSTR* filepath...so i cant pass the variable which i am capturing as a CString. What is the problem??? Thanking you. Satadru.

      M Offline
      M Offline
      Monty2
      wrote on last edited by
      #2

      strings are used as BSTR in COM VB Hides this complexity from the user but in VC u'll have to convert BSTR in to CString there are many good bstr classes in VC u can use Live as if your were to die tomorrow. Learn as if you were to live forever. -Mahatma Gandhi

      S 1 Reply Last reply
      0
      • S satadru

        hi , i have created an activex control in vb. in one of the method the user passes the file path to the control. in vb i used string to get the file path... now in vc++ when i insert the control its been declared i.e the string variable is been declared as BSTR* filepath...so i cant pass the variable which i am capturing as a CString. What is the problem??? Thanking you. Satadru.

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #3

        Quick Hack YourFunc(_bstr_t((LPCTSTR)MyString)); Michael Snow is lying on the ground, and in the air the sleigh bells sound, The frosted patterned window panes, it's British summer time again. No, it's not, It's Christmas - Santa Claus in on the Dole (Spitting Image 1986)

        P S 2 Replies Last reply
        0
        • M Michael P Butler

          Quick Hack YourFunc(_bstr_t((LPCTSTR)MyString)); Michael Snow is lying on the ground, and in the air the sleigh bells sound, The frosted patterned window panes, it's British summer time again. No, it's not, It's Christmas - Santa Claus in on the Dole (Spitting Image 1986)

          P Offline
          P Offline
          Prakash Nadar
          wrote on last edited by
          #4

          You bet :-) My God is more powerfull Than Your God. (the line that divides the world)

          1 Reply Last reply
          0
          • M Monty2

            strings are used as BSTR in COM VB Hides this complexity from the user but in VC u'll have to convert BSTR in to CString there are many good bstr classes in VC u can use Live as if your were to die tomorrow. Learn as if you were to live forever. -Mahatma Gandhi

            S Offline
            S Offline
            satadru
            wrote on last edited by
            #5

            hi thanks for your reply .. i have found out the problem... while creating the methods for the control i used functions which are by default reference but in vc++ its by value .... that was the problem ..thanks anyway

            1 Reply Last reply
            0
            • M Michael P Butler

              Quick Hack YourFunc(_bstr_t((LPCTSTR)MyString)); Michael Snow is lying on the ground, and in the air the sleigh bells sound, The frosted patterned window panes, it's British summer time again. No, it's not, It's Christmas - Santa Claus in on the Dole (Spitting Image 1986)

              S Offline
              S Offline
              satadru
              wrote on last edited by
              #6

              hi thanks for your reply .. i have found out the problem... while creating the methods for the control i used functions which are by default reference but in vc++ its by value .... that was the problem ..thanks anyway

              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