Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6830217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:35:31+00:00 2026-05-26T22:35:31+00:00

Firstly, I’m some what new to C++/CLI . After doing some research I’ve found

  • 0

Firstly, I’m some what new to C++/CLI.

After doing some research I’ve found that I can use Marshal::PtrToStringBSTR to convert an IntPtr to System::String. So, is there a way to convert my _bstr_t variable to an IntPtr so that I can pass it to the function mentioned and do conversion?

Or,

What is the correct way of converting a _bstr_t variable to System::String?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:35:31+00:00Added an answer on May 26, 2026 at 10:35 pm

    You should be able to use marshal_as to get a System::String.

    marshal_as<System::String^>(value);
    

    Here’s the MSDN page for the different string types: http://msdn.microsoft.com/en-us/library/bb384865.aspx

    Most important thing is to pay attention to the right #include depending on your string type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly, I was wondering if there was some kind of built in function that
Firstly, let me just say that I'm very new to JSR-170 and Jackrabbit/Lucene in
Firstly, I have done my research and already know that JavaScript = client JSPs
Firstly, Real World Haskell , which I am reading, says to never use foldl
Firstly I know that there are many question and solutions to correct thread marshalling
Firstly, let me start by saying that I haven't ever directly used SQL views.
Firstly I design the site & convert it into HTML using Twitter bootstrap. The
Firstly is it possible to use objective C to find out if the user's
Firstly, I just want to say that the gmaps4rails gem has been fantastic. Easy
Firstly, I have search Stack Overflow for the answer, but I have not found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.