Win16 calls by Win32 functions

Dmitry Timoshkov dmitry at baikal.ru
Mon Jun 25 10:14:50 CDT 2001


"Patrik Stridvall" <ps at leissner.se> wrote:

> Noticing that you (Dimitry) have send in a few patch
> replacing Win16 calls by Win32 ones, I wish to
> point out that winapi_check can detect "illegal"
> calls from Win32 to Win16.
> 
> Just do 
> winapi_check --cross-call-win32-win16

Great! Why didn't you just make a patch and submit it?

> Unfortunately there is a bug in the CVS version
> of winapi_check (fixed in my tree) that makes this
> option output too many messages. However until
> it is updated just do "grep 'illegal call'" on
> the output.
> 
> The result this is included below.
> Note that some of the fixes in your (Dimitry's)
> patches is not included in the result below
> because they are Win16 functions calling Win16
> functions.
> 
> I do not say this is nessary wrong, but are
> you (Dimitry) really sure this is how it should be?

Well, as Alexandre already has pointed out, Win16 should be
mostly implemented by using Win32. I agree with him that use
of the 16-bit code should be eliminated as much as possible.
Moreover, until now I just have replaced only obvious places:
16-bit functions which just thunk up to win32 without any
argument processing.

> Sure it probably runs a little faster, but then Win16
> applications on a modern computer are likely to be 
> _very_ fast, so it is really worth risking potential
> compabillity errors because of some probably irrelavant
> speed differences.
> 
> Not that functions like DeleteObject are likely to
> have such problems but still...

I'm not going to blindly replace 16-bit calls by 32-bit.
I look into the code and do think twice before submitting
a patch.

Anyway, thanks for your comments.
--
Dmitry.





More information about the wine-devel mailing list