'windres' bug

Dirk Meyer dirk@plt.rwth-aachen.de
Sun Feb 28 23:02:00 GMT 1999

>>> VS_VERSIONINFO structure created by 'windres' (B20.1)
>>> cannot be read by win9x (I don't know about nt).
>>> Stringtable sould have a 'total length' (first word),
>>> 'length of value' (second word) - missing (always set to 0),
>>> and 'type' (third word).
>> I applied a patch for this from a net user just yesterday!  What a
>> coincidence.  I've attached a diff if you need it.

> Yes, indeed. It's big confusing coincidence.
> I have sent similar uuencoded patch to cygwin just before
> getting your message!

> Patches are similar but they are different!
> [ (*pp)->length vs (*pp)->length / 2]

> The question is: which one is the right one?

> In first version of my patch was this
> '(*pp)->length / 2'(number of UNICODE chars in string - should be
> right
> because based on Microsoft/Borland compilers output)
> But in second version is '(*pp)->length'
> (number of bytes used should be even more right considering a bug
> in microsoft based compilers - isn't very probabe?)

> And here comes more of confusing questions...

> In binary table (which is the same structure as stringtabe)
> second word seems to mean 'bytes used' not 'data items used',
> the same should be in string version.
> On the other hand, Microsoft (THE VERY GREAT AUTHOR)
> should exactly know what it stands for, so 'chars used'
> may be considered a perfect right one.
> Finaly, it doesn't matter since any non-zero value seems to work
> fine!

> Now You decide which version is the right version.

Well, you guessed right -- the '(*pp)->length / 2' version, which is
my "solution" to the windres bug, is based on the Borland compiler's
output... and it works on WINNT (I haven't tested it on WIN9x).

As long as you don't trust the Borland/Microsoft compiler's output,
just use your '(*pp)->length' version and save the few nanoseconds my
version would need for the devision by 2 ;-).

* Dipl.-Ing. Dirk Meyer           *
* Lehrstuhl für Prozeßleittechnik *
* RWTH-Aachen                     *
* D-52056 Aachen                  *
* Tel.:   ++49 (241) 80-7709      *
* Fax:    ++49 (241) 8888-238     *
* E-Mail: dirk@plt.rwth-aachen.de *

Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

More information about the Cygwin mailing list