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 8793941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:11:13+00:00 2026-06-13T23:11:13+00:00

Hai i want to convert the &var values into char array. how can i

  • 0

Hai i want to convert the &var values into char array.
how can i achieve this?
i am using C++ Win32 API.
Safe Array to Char

Open image in another tab,you will get clear View.

Thanks in advance.

  • 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-06-13T23:11:13+00:00Added an answer on June 13, 2026 at 11:11 pm

    The easiest way is to use ATL::CComSafeArray. Assume you have a pointer to safe array in variable pSa,

    CComSafeArray<BSTR> array;
    array.Attach(pSa);
    
    for(int i=0; i< array.GetCount(); ++i)
    {
      std::wcout << (const wchar_t*) array[i] << std::endl;
    }
    

    If you want to use just win32,

    SafeArrayLock(pSa);
    LONG uBound = -1, lBound = 0;
    SafeArrayUBound(pSa,1,uBound);
    SafeArrayUBound(pSa,1,lBound);
    int nCount = uBound - lBound + 1;
    for(int i = 0; i<nCount; ++i)
    {
     std::wcout << ((BSTR*)(pSa->pvData))[i] << std::endl;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hai.all..can you tell me how to make table in jquery? i want using this
Hai, I am using Java GWT. In this i want to load one html
Hai I have worked with clean URL in php. Now I want to convert
hai,In my application i want to calculate the spped based on x,y,z values.So How
Hai guys, As i want to develop an application using asp.net MVC, i dont
Hai i want to create number notification dynamically,i can able to create single notification
hai I want to give a javascript variable within a double Quotes , Can
Hai i want create a full screen mode ,so i used this link http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/
hai friends In my application i want to send sms using nokia 3310c mobile
Hai Frnds, i want to know to launch a satellite application using Intent, i

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.