Re: all references to "User32.dll" discarded by /OPT:REF

From: f0dder (f0dder_spicedham_at_flork.dk)
Date: 07/19/04


Date: Mon, 19 Jul 2004 05:17:27 +0200

hutch-- wrote:
> smile,
>
> Deliberately misleading learner programmers with this viral "yadda
> yadda" is not a winner when you have continued to be wrong. Dreaming
> up scare tactics to further mislead learner programmers does not solve
> the problem of you repeatedly inflicting your mistakes on people who
> actually need help.
>
> ======================================================================
> Not too much of a problem with user32.dll, most apps need it and it's
> always loaded on the system anyway... but imagine a duplicate protos
> for a whole lot of functions in a static library? "So, why am I
> pulling
> in 200kb from this library when I only need 20kb?"
> ======================================================================
>
> In the face of uncontestable proof that you are wrong with this
> assertion, why should anyone take any notice of you when you have done
> the same thing for years inflicting your mistakes on learner
> programmers.
>
Anybody interested can have a look at the following URL, view the
discussion there, download a zip file with examples demonstrating exactly
what I mean. To keep it short: yes, PROTOs redeclarations _will_ cause
unnecessary things to be linked into your exe, and while it's not too
bad to have a unused USER32.DLL included, a big static library can hurt.
http://board.win32asmcommunity.net/showthread.php?s=&threadid=18906

> ======================================================================
> What about PROTO redefinition? You said masm will abort with an error,
> my test shows that it simply ignores the conflicting proto.
> ======================================================================
>
> You are attempting to correct a system that uses ML.EXE 6.14 which
> DOES abort on non-benign redefinitions. Playing with a later version
> does not solve this problem for you.
>
> The following error of prototype redefinition generates the following
> error.
>
Ah, interesting - you *add* parameters to the PROTO, while I *remove*
them. ML 6.14.8444, as included with MASM32v8, as well as ML 7.10.3077
have the same behaviour here: error on *adding*, NOTHING on *removing*.
A thing to keep in mind!
Thanks for bringing this to my attention!

(If you had bothered to look at my tests, you would have realized this
yourself, I suppose.)