Subject: Re: Will CSTAR publish its DLL

From: Bo Yang <[email-masked]>
Date: Fri, 22 Jul 1994 10:47:54 -0700

>The main point is to distinguish CSTAR/TB services from existing English
>character services. If CSTAR/TB services override the existing ones, it will
>cause system instability. My only objection of CSTAR/TB is that they are
>INVASIVE. I hope they provide COMPLEMENTARY character services rather than
>OVERRIDING the existing ones.

But CSTAR is supposed to overrid the existing API calls. no more, no less.

It's not the interest of CSTAR to provide any API for developers. not
at all. the very point of patching is to make the patcher itself insivible,
so exsisting English applications will be handling Chinese, with exactly
the same calls to exising API.

For example, most word processors uses TextOut() call to put text on
screen and printer. now, this is what I think CSTAR does:

1. intercept all TextOut calls.
2. search for GB codes ( (unsigned) c > 0xA0 )
3. for parts (or all) of the string that contains non-GB calls, pass the
   call to exisiting TextOut().
4. for parts (or all) of the string coded with GB, using internal routines
   of CStar to translate the codes into indexes, look up the bitmaps,
   and disply the chinese characters with BitBlt() call (the existing
   bitmap displaying routine of Windows API)

the whole process is totally transparent to the applications (it has to be!
tell me how CStar is gona function without FORCING every application to
use the patched API calls? there's no way to patch every application!).

Now, CStar team COULD put together part 4 and export the function to other
applications, maybe call it HZTextOut(). but why should they bother? it won't
help CStar to compete.

I list the exported functions of CStar.exe and chinese.dll following this
article. as you can see there're only few exported calls that have
clear functional identites. If you try hard to search for a set of
useable APIs from these scattered P?? calls, I wish you good luck.:)

I don't expect CStar team to publish a set of chinese APIs, unless lots
of developers started to write applications for it. This contradicts
with very reason of the existence and evolving of Cstar, which is to make
existing English applications happy with hanzi so no one needs to write
new chinese applications.

regards

-- Bo
________________________________________________

windows excutables and DLLs are different from DOS applications in one
aspect. They contain a list of the NAMES of exported functions that
windows could link with dynamically at run time. The list has to be
at the beginning of the binaries so windows could search for the offset
tags for linking. This makes it easy to extract the names of the exports.
all you need is a small utility (I used Borland's EXEMAP.EXE). Note for
DLLs used as developer's libraries, the names of these functions should be
made reasonably readable.

CSTAR.EXE:
......
 Address         Publics by Value^M
^M
 0001:0000       CSTAR.245^M
 0001:00CC       CSTAR.248^M
 0001:010E       CSTAR.243^M
 0001:051F       CSTAR.247^M
 0001:0ADD       CSTAR.246^M
 0001:0C9F       CSTAR.244^M
 0001:0D0E       CONFIRMPROC^M
 0001:0DD1       CONFIRMEXITPROC^M
 0001:0E88       CSTAR.250^M
 0002:0000       CSTAR.241^M
 0002:02D1       ABOUTPROC^M
 0002:04C0       SETMODEPROC^M
 0002:058D       CSTAR.251^M
 0002:0A58       KBMAPPROC^M
 0002:0E7F       CSTAR.249^M
 0003:0000       CSTAR.242^M
 0003:00E6       REDRAWWNDPROC^M
 0003:013F       CSTAR.252^M
 0003:0B2F       DESKTOPPROC^M
 0003:0B78       SHELLWNDPROC^M
 0003:0BD9       CSTARWNDPROC^M
^M
chinese.dll:
...
 Address         Publics by Value^M
^M
 0001:0000       Chinese.10003^M
 0001:0010       PB^M
 0001:0075       PA^M
 0001:01E8       WEP^M
 0001:020E       Chinese.10000^M
 0001:08BD       Chinese.10001^M
 0001:0902       FCINSTALLFONTS^M
 0001:0F18       ENUMCFNTPROC^M
 0001:0FD0       FCUNINSTALLFONTS^M
 0001:1603       EDITPROC^M
 0001:1E43       WORDBREAKPROC^M
 0001:1E93       Chinese.10002^M
 0002:023E       CKBCONTROL^M
 0002:0437       PC^M
 0002:04DE       P31^M
 0002:0A85       CSISLEADCHAR^M
 0002:0AAC       CSCHARNEXT^M
 0002:0BAC       P21^M
 0002:0BE7       P22^M
 0002:0D80       P25^M
 0002:0D9F       P26^M
 0002:0E31       P23^M
 0002:0EB1       P24^M
 0002:0F3D       P32^M
 0002:0F73       P51^M
 0002:0FA8       P52^M
 0002:0FEA       P90^M
 0002:1030       P15^M
 0002:10F4       P16^M
 0002:11B0       P17^M
 0002:120F       P18^M
 0002:127E       P43^M
 0002:137A       P44^M
 0002:13DE       P41^M
 0002:148B       P42^M
 0002:155E       P19^M
 0002:16A8       FCREADFONT^M
 0002:20FD       P11^M
 0002:2D93       P13^M
 0002:2E2A       P14^M
 0002:2ED3       P12^M
 0002:30AF       P33^M
 0003:0000       SETCHINESE^M
 0003:005A       ENUMEFONTSPROC^M
 0003:01BA       SETMODEPROC^M
 0003:039E       SETFONTPROC^M
 0003:05CD       INSTFONTPROC^M
 0003:0639       TREEMAPPROC^M