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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:46:29+00:00 2026-06-11T18:46:29+00:00

I have code designed for Win32 (XP and later) that I am porting to

  • 0

I have code designed for Win32 (XP and later) that I am porting to Windows Mobile 6. It contains this line:

int count = ::WideCharToMultiByte( CP_ACP, WC_NO_BEST_FIT_CHARS, ..., 0, 0 );

On Windows XP, this works fine, but on Windows Mobile it returns 0 and GetLastError() returns error 1004 “Invalid flags”. WC_NO_BEST_FIT_CHARS is defined in winnls.h in the Windows Mobile 6 SDK.

This code will work in my limited tests if I either replace the call with ::wcstombs or replace WC_NO_BEST_FIT_CHARS with 0.

I’d like to know what is the ramification of making either of those changes. Will this still work if I run my program on a Chinese or Russian version of Windows Mobile?

  • 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-11T18:46:31+00:00Added an answer on June 11, 2026 at 6:46 pm

    Windows Mobile is based on Windows CE, and acording to the documentation, WideCharToMultiByte does not support the flag WC_NO_BEST_FIT_CHARS in Windows CE.

    According to that page, supported flags are:

    WC_COMPOSITECHECK   Convert composite characters to precomposed characters.
    WC_DISCARDNS        Discard nonspacing characters during conversion.
    WC_SEPCHARS         Generate separate characters during conversion.
                        (This is the default conversion behavior).
    WC_DEFAULTCHAR      Replace exceptions with the default character during conversion.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some PHP code that is designed to make a spreadsheet with formulas
I basically have a lot of poorly designed code to do something that, I'm
I have the following code section, designed to count how many Excel processes are
I have error handling code that is designed to catch unnhandled exceptions, and then
In my aspx file, I have some code that looks like this: <script type=text/javascript>
I have some code that I'm trying to rewrite. The code is designed to
The following code is designed to count the number of elements that satisfy the
I have my application designed with Repository pattern implemented and my code prepared for
I have code that generates a List<string[]> variable but can't quite figure out how
I have code like this in my view model: function ChatListViewModel(chats) { var self

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.