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. COM
  4. BSTR arguments

BSTR arguments

Scheduled Pinned Locked Moved COM
helpquestion
4 Posts 3 Posters 3 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.
  • Y Offline
    Y Offline
    yamini
    wrote on last edited by
    #1

    Hi all, I am trying to pass BSTR arguments to a component's function from a client !I am using L prefix for the arguments !The problem is I am not getting any argument value in the function at the component !What may be the problem ! How can i successfully pass the BSTR arguments to the Interface function ! Thanx in advance for the help ! Y.Yamini Devi

    M L 3 Replies Last reply
    0
    • Y yamini

      Hi all, I am trying to pass BSTR arguments to a component's function from a client !I am using L prefix for the arguments !The problem is I am not getting any argument value in the function at the component !What may be the problem ! How can i successfully pass the BSTR arguments to the Interface function ! Thanx in advance for the help ! Y.Yamini Devi

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Using L before a string makes it Unicode, not a BSTR. Read up on SysAllocString() and related APIs, and the _bstr_t CComBSTR wrapper classes. --Mike-- http://home.inreach.com/mdunn/ The Signature, back by popular demand: Buffy. Pajamas.

      1 Reply Last reply
      0
      • Y yamini

        Hi all, I am trying to pass BSTR arguments to a component's function from a client !I am using L prefix for the arguments !The problem is I am not getting any argument value in the function at the component !What may be the problem ! How can i successfully pass the BSTR arguments to the Interface function ! Thanx in advance for the help ! Y.Yamini Devi

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Hi Yamini :rose: The component u r using in VC++, i suppose have u tried L"xyz" in this fashion.if not then try it,possibly u will get the answer.Or try in this way:- CString str; str="ABC"; str.SysAllocString(); This may solve the problem. Bye

        1 Reply Last reply
        0
        • Y yamini

          Hi all, I am trying to pass BSTR arguments to a component's function from a client !I am using L prefix for the arguments !The problem is I am not getting any argument value in the function at the component !What may be the problem ! How can i successfully pass the BSTR arguments to the Interface function ! Thanx in advance for the help ! Y.Yamini Devi

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Hi Yamini :rose: The component u r using in VC++, i suppose have u tried L"xyz" in this fashion.if not then try it,possibly u will get the answer.Or try in this way:- CString str; str="ABC"; str.SysAllocString(); Then pass this instead of BSTR argument. This may solve the problem. Bye

          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