[comp.windows.ms] What does this warning mean?

LIBCRN@BYUVM.BITNET (09/27/90)

   I have been programming for windows only a short time and
I love it.  I do, however, have a small problem that I chould
use some help with.
   Every program that I compile ends with these messages from
the resource compiler:

 RC: warning RW4002: Non-discardable segment 1 set to PRELOAD
 RC: warning RW4002: Non-discardable segment 2 set to PRELOAD

   The compiled programs seem to function correctly but these
messages are quite bothersome and I would like to know what
they mean.  I can't find these messages anywhere in the manual.
   I am using MSC 6.0 and the windows SDK 3.0.

--Cory
(libcrn@byuvm.bitnet)

pnl@hpfinote.HP.COM (Peter Lim) (09/29/90)

> 
>    I have been programming for windows only a short time and
> I love it.  I do, however, have a small problem that I chould
> use some help with.
>    Every program that I compile ends with these messages from
> the resource compiler:
> 
>  RC: warning RW4002: Non-discardable segment 1 set to PRELOAD
>  RC: warning RW4002: Non-discardable segment 2 set to PRELOAD
> 
Can't remember exactly off hand. But I've seen this before. You must
be compiling programs you done in Windows SDK 2.x. As it turn out,
the difference is in the .DEF file. You need to specify PRELOAD or
otherwise in your DATA and CODE statements.

I didn't see it mentioned in the manuals. This worked for me.
Apparently Windows 3.0 added PRELOAD to the syntax of .DEF file.
Do experiment.


Regards,                       ## Life is fast enough as it is ........
Peter Lim.                     ## .... DON'T PUSH IT !!          >>>-------,
                               ########################################### :
E-mail:  plim@hpsgwg.HP.COM     Snail-mail:  Hewlett Packard Singapore,    :
Tel:     (065)-279-2289                      (ICDS, ICS)                   |
Telnet:        520-2289                      1150 Depot Road,           __\@/__
  ... also at: pnl@hpfipnl.HP.COM            Singapore   0410.           SPLAT !


#include <standard_disclaimer.hpp>

davidds@microsoft.UUCP (David D'SOUZA) (10/01/90)

All this means is that in your def file, you have a segment marked 
MOVEABLE or FIXED but it isn't marked PRELOAD.  The segment isn't 
DISCARDABLE so Windows needs to make sure it is loaded when the app
starts so RC tells you it is doing the sensible thing and forcing it to
PRELOAD even though you didn't explicitly tell it to.  Fix this by 
adding PRELOAD to the segments in question. (or make them discardable)

--Dave

In article <18950038@hpfinote.HP.COM> pnl@hpfinote.HP.COM (Peter Lim) writes:
>> 
>>    I have been programming for windows only a short time and
>> I love it.  I do, however, have a small problem that I chould
>> use some help with.
>>    Every program that I compile ends with these messages from
>> the resource compiler:
>> 
>>  RC: warning RW4002: Non-discardable segment 1 set to PRELOAD
>>  RC: warning RW4002: Non-discardable segment 2 set to PRELOAD