Re: use CreateProcessA in Unicode mode



THis is more than a little weird...I would think it is downright stupid. How do I know
the process I'm launching is or is not a Unicode process? It could be one today and the
other tomorrow, for that matter...
joe

On Fri, 27 Apr 2007 18:22:26 +0900, "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote:

If you're using Tstrings correctly then you need to take extra care with the
environment that you create for the subprocess. If your process is running
in ANSI mode and you create an ANSI environment for the subprocess then it
seems that your call is correct. If your process is running in Unicode mode
and you create a Unicode environment for the subprocess then you must
include the CREATE_UNICODE_ENVIRONMENT flag in the sixth parameter.

(A friendlier design would have defaulted this flag to match the calling
process's mode. If the calling process wanted to do the opposite then it
could set either CREATE_UNICODE_ENVIRONMENT or CREATE_ANSI_ENVIRONMENT as
needed. Well, we don't have this design and we don't have
CREATE_ANSI_ENVIRONMENT. Or at least we don't have a documented one.)

"Duy Trinh" <duy.trinh@xxxxxxxxxxx> wrote in message
news:u0DJ3DIiHHA.3452@xxxxxxxxxxxxxxxxxxxxxxx
Hi all,

How to use CreateProcessA in Unicode mode? i am building project in
Unicode mode, so CreateProcessW is used, but have problem on Vista. if i
build project in None-Unicode mode, then CreateProcessA is used, and it
work well on Vista.

So i want to keep my project in Unicode mode, and CreateProcessA is used
in this mode.

Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: SBS 2003 Standard/Exchange Server issue
    ... load the Outlook 2003 template. ... Double-click Exchange Unicode Mode - Ignore Archive Format. ... Finally, if a user's mail delivery location is a PST file, Outlook ...
    (microsoft.public.windows.server.sbs)
  • Re: Archive does not work due to non-Unicode format
    ... Is the auto-archive process configured for an existing .pst file? ... > going from Exchange 2000/Outlook 2000 to Exchange ... > and it says we are running in Unicode mode. ... >>Does it say you are running in Unicode mode or Non- ...
    (microsoft.public.outlook.general)
  • Re: Unicode Mode
    ... The article explains Unicode, its benefits, and how to enforce it but not ... >> an error message when they attempt to setup their archive file using the ... >> in Unicode mode against Exchange server and cannot archive items to a ... I can't seem to find any documentation on how to switch from ...
    (microsoft.public.outlook.general)
  • Re: .ost file has reached max limit help
    ... You have to create a new Unicode PST file, then move the contents of the old ... Unicode format unfortunately. ... > seeing something about Outlook 97-2002 for his profile. ... >>> stating that we should consider switching to unicode mode. ...
    (microsoft.public.exchange.admin)
  • Re: use CreateProcessA in Unicode mode
    ... If your process is running in ANSI mode and you create an ANSI environment for the subprocess then it seems that your call is correct. ... If your process is running in Unicode mode and you create a Unicode environment for the subprocess then you must include the CREATE_UNICODE_ENVIRONMENT flag in the sixth parameter. ... How to use CreateProcessA in Unicode mode? ...
    (microsoft.public.vc.mfc)