News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

manifest

Started by jimg, December 07, 2019, 09:09:21 AM

Previous topic - Next topic

jj2007

Quote from: TimoVJL on January 17, 2020, 03:21:45 AMpolink 9.0 works.

I re-checked and yes, you are right, versions 8.00.2 and 9.00.2 work. Unfortunately the old 6.50.0 that ships with the SDK chokes.

Vortex

Binary to resource file converter handling XML files :

Usage : bin2res binaryfile.ext ResID ResType

        ResID can be a number with a leading symbol # or a string identifying
        the binary data.

        ResType = RCD for RC_DATA binary file
                  XML for Manifest file


bin2res Autumn.txt POEM RCD
bin2res Manifest.xml #1 XML
\masm32\bin\rc Rsrc.rc
\masm32\bin\ml /c /coff Dlgbox.asm
\masm32\bin\polink /SUBSYSTEM:WINDOWS Dlgbox.obj Rsrc.res Autumn.res Manifest.res

jj2007

I wonder if it would be useful to add resources to a library. Apparently it is possible, at least the linker doesn't complain, but how would one access such a resource? In my tests, the lib does contain the resource but the exe doesn't. Any idea?

Vortex

QuoteNote that you can't lib in object files created with cvtres. If multiple object files are provided, lib complains as though as multiple .res files were given; if a single object file is provided, lib does not complain, but the linker simply ignores the embedded resource data in the lib file.

https://stackoverflow.com/questions/531502/vc-resources-in-a-static-library/1631078

jj2007

Thanks. Indeed, I can see the resource in the lib file, but if the linker ignores it... what can we do ;-)

hutch--

Long ago I experimented with adding resources in the form of DB sequences into library modules so that they did not depend on external resources to display simple things like icons and from memory I got it to work OK. Been so long ago I forget how it was done.

Vortex

Dialog box templates in memory should do the job but the classical resource files are easier to use and maintain.

jj2007

Even easier than a resource file, you can use macros like DlgDefine to do in-memory dialogs.

Vortex

Hi Jochen,

Thanks. The macros are better, I agree with you.