Display Chinese charaters using NtDisplayString

Hi Devs!

I want to write a native application in which I want to display the Chinese characters on startup screen, I have tried to print some unicode characters like ’ ?’ but its not get printed, instead only ‘c’ printed.

So is it possible to print such characters on startup screen?

Regards,
Avirat

Hi Devs!

I want to write a native application in which I want to display the Chinese characters on startup screen. Right now event if in the Chinese version of windows, I print some Chinese characters, its not get printed properly. Instead some other characters get printed.

So is it possible to print such characters on startup screen?

Is there any font related requirements in native (start up mode)?

Regards,
Avirat

xxxxx@yahoo.com wrote:

I want to write a native application in which I want to display the Chinese characters on startup screen. Right now event if in the Chinese version of windows, I print some Chinese characters, its not get printed properly. Instead some other characters get printed.

So is it possible to print such characters on startup screen?

The short answer is “no”. A native application is displaying on a VGA
running in text mode (mode 3). The only characters you have available
to you are the 256 characters in the VGA’s character generator. By
default, that’s Code Page 437.

It’s possible for you to load your own font in the character generator,
but that has the potential to confuse other native apps.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Tim.

Will you please give me some hints / links regarding how to load my own font in the character generator.

xxxxx@yahoo.com wrote:

Will you please give me some hints / links regarding how to load my own font in the character generator.

There are many reference books and web sites on programming the VGA –
the hardware is almost 25 years old. You’ll have to create a bitmapped
font with 8x16 characters. And you’ll need to reload the standard font
when you exit, otherwise blue screens will look wrong.

(Actually, I think blue screens are in 50-line mode, which has it’s own
8x8 font, but you still need to clean up after yourself.)


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

“Tim Roberts” wrote in message news:xxxxx@ntdev…
>
> The short answer is “no”. A native application is displaying on a VGA
> running in text mode (mode 3).>

Only in post-Vista. In Windows XP the screen was blue and on Windows 2000
the screen had a coloured logo with text in a black box. Definitely graphics
mode.

So to answer OP’s question. Don’t do this. The environment is volatile,
changes from version to version while the method of loading fonts depends on
the environment.

I’ve seen NtDisplayString() fail on XP even with English text in some weird
cases… Why bother with Chinese? What application are you writing, what are
your goals? Does the app need to be interactive? Why not log everything to
disk?


Aram Hăvărneanu

On Fri, Feb 26, 2010 at 2:44 PM, Aram Hăvărneanu wrote:
>
> Only in post-Vista. In Windows XP the screen was blue and on Windows 2000
> the screen had a coloured logo with text in a black box. Definitely graphics
> mode.

I suppose you could call InbvAcquireDisplayOwnership() and
InbvResetDisplay() and then have VGA mode…

But still, why?

>
> So to answer OP’s question. Don’t do this. The environment is volatile,
> changes from version to version while the method of loading fonts depends on
> the environment.
>
> I’ve seen NtDisplayString() fail on XP even with English text in some weird
> cases… Why bother with Chinese? What application are you writing, what are
> your goals? Does the app need to be interactive? Why not log everything to
> disk?
>


Aram Hăvărneanu