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

  • SEARCH
  • Home
  • 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 8562579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:45:35+00:00 2026-06-11T16:45:35+00:00

I used ShellExecuteEx() to call an executable file. And the following are the parameters

  • 0

I used ShellExecuteEx() to call an executable file. And the following are the parameters I set for SHELLEXECUTEINFO structure.

SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS|SEE_MASK_UNICODE;// Set Unicode Flag
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpParameters = TEXT ("/s");
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOWNORMAL;
ShExecInfo.hInstApp = NULL;
ShExecInfo.lpFile = TEXT ( ".\\bin\\x86\\installerx86.exe" ); 

The ShExecInfo.fMask is set for Unicode, but the ShExecInfo.lpFile is not prepended with "\\?\".
In this case, is my code compatible with Unicode?

  • 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-11T16:45:37+00:00Added an answer on June 11, 2026 at 4:45 pm

    You are mixing up concepts. All path strings are Unicode by the time the kernel code uses these strings. The non-Unicode version of ShellExecuteEx (named ShellExecuteExA) simply translates all strings and converts the SHELLEXECUTEINFOA structure to a SHELLEXECUTEINFOW structure, then calls the real api function, ShellExecuteW(). You don’t see these real identifier names in your code since a macro selects between them, but you can certainly see them in the ShellAPI.h SDK #include file.

    The SEE_MASK_UNICODE is a fairly mysterious option, hard to set correctly for one. I think it is related to the CREATE_UNICODE_ENVIRONMENT option for CreateProcess, indicating that the environment for the new process may contain Unicode characters.

    The \\?\ prefix on the path string selects between Win32 path names and the native Windows kernel path names. Win32 is an API layer on top of the native operating system. There used to be multiple api layers, OS/2 and Posix were once supported but fell out of use. The native operating system is very unlike Win32, it resembles the VMS operating system, the one David Cutler worked on before he got hired by Microsoft to design NT. No such thing as a C: drive there, it only knows, say, \Device\Harddisk0\Partition0.

    The API layer translates between these two worlds. By prefixing the path string with \\?\ you tell Win32 to use the path string as-is. Which then makes it acquire the capabilities of a native path string, having support for paths as long as 32726 characters and bypassing the infamous Win32 MAX_PATH limitation. These strings being Unicode is implied, that’s all the kernel can handle. ShellExecuteA will otherwise happily convert an 8-bit encoded string that contains this prefix for you.

    Long story short: it is not automatic. You have to do this explicitly by programming the prefix yourself.

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

Sidebar

Related Questions

I used ShellExecuteEx to call iexplore.exe , Whenever I start the application a new
I used the phonegap website to create an IPA file. Now I want to
I used the following code to display the event details fetched from the database.
I used the following code to display a rich list. import net.rim.device.api.ui.*; import net.rim.device.api.ui.container.*;
I used the following link to download the latest Xampp in order to install
Used the following to fix the problems (for the remaining issues, will change my
I used following command on windows xp and its working perfectly fine. rundll32.exe url.dll,FileProtocolHandler
I have a batch file using the following code: @echo off :: BatchGotAdmin :-------------------------------------
I used the following to get it to work partially: %{ #define OR 2
I used MyBatis Generator 1.3.1 to create a Mapper.xml file. When MyBatis parses the

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.