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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:33:49+00:00 2026-05-22T02:33:49+00:00

hello all i have code from open source project that im integrating into my

  • 0

hello all
i have code from open source project that im integrating into my code .
now my code settings in visual studio 2008 character set is Unicode . and the external code is
Multi-Byte Character Set. when i change the character setting in my application after adding the new source
im getting other errors in my code .
so reading from the net i guess i need to make some changes to the external code to support unicode.
here is my code :

string FullPathToExe = c:\\foo\\boo.exe;
vector<char> str2(FullPathToExe.begin(), FullPathToExe.end());
    str2.push_back('\0');
    if (!CreateProcess(NULL,
                     &str2[0],
                    NULL,
                    NULL,
                    TRUE,
                    0,
                    NULL,
                    NULL,
                    &si,
                    &pi))
and the error is :
 : error C2664: 'CreateProcessW' : cannot convert parameter 2 from 'char *__w64 ' 
 to 'LPWSTR'

im not win32 programmer and this is new to me.

how can i support both developer that are using multi byte and Unicode ?

Thanks for helping

  • 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-22T02:33:50+00:00Added an answer on May 22, 2026 at 2:33 am

    For the first one use vector<wchar_t> instead of vector<char>.
    For the second one use L"ERROR: API = %s.\n error code = %d.\n message = %s.\n" instead of "ERROR: API = %s.\n error code = %d.\n message = %s.\n" (note the L at the start.

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

Sidebar

Related Questions

Hello I have a tuple in string that I revive from a PostgreSQL function>
Hello All, I have the following molten data: X variable value 1 StationA SAR11.cluster
Possible Duplicate: [F#] How to have two methods calling each other? Hello all, I
In my model I have a string txtSearche with the value coming from a
I'm trying to run the following code but unfortunately facing Error problems package jskypeexample;
I was trying to use IB in a slightly different way that I am
I am trying to copy over some files pulled out from a zip folder,
I'm about to go crazy here so I'll just ask: How the hell do
// Java programmers, when I mean method, I mean a 'way to do things'...
I'm trying to build a Python application using pyGTK, treads, and sockets. I'm having

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.