News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Sharing values

Started by Biterider, November 14, 2018, 01:56:15 AM

Previous topic - Next topic

jj2007

Quote from: Biterider on November 24, 2018, 06:42:46 PMWhat I've noticed, however, is that, for example, EQUs with symbolic content can not be converted, since the symbols do not represent their actual value in the code.
If you have a crispy example of an asm+rc pair where this matters, please post it. Right now I have no time at all, but it shouldn't take more than ten minutes to adapt my preprocessor for parsing also the symbolic equates. Compilers do that all the time.

TimoVJL

Quote from: jimg on November 24, 2018, 03:49:54 PM
Not to hijack the thread, but...   I also seldom use resource files, but I have searched in vain how to get around manifests, how do you do it without a resource file?
search -manifest:embed link.exe commandline option for latest linkers.
OPTION DOTNAME

.drectve SEGMENT INFO DISCARD
db "-subsystem:console "
db 34,"-manifestdependency:type=",39,"Win32",39
db " name=",39,"Microsoft.Windows.Common-Controls",39
db " version=",39,"6.0.0.0",39
db " processorArchitecture=",39,"*",39
db " publicKeyToken=",39,"6595b64144ccf1df",39
db " language=",39,"*",39,34
;db " -manifest:embed "
.drectve ENDS
May the source be with you

jj2007

Quote from: Biterider on November 24, 2018, 06:42:46 PMEQUs with symbolic content can not be converted, since the symbols do not represent their actual value in the code.

Just checked my tool in Reply #7, and surprise surprise, this works:
source.asm:
IDM_FILE_OPEN EQU 40001
IDM_FILE_SAVE EQU IDM_FILE_OPEN+9


source.rc, before preprocessor ran:
#define IDM_FILE_OPEN ?
#define IDM_FILE_SAVE ?


source.rc processed:
#define IDM_FILE_OPEN 40001
#define IDM_FILE_SAVE IDM_FILE_OPEN+9


... and that works fine with rc.exe :t

jimg

Quote from: TimoVJL on November 24, 2018, 11:11:07 PM
Quote from: jimg on November 24, 2018, 03:49:54 PM
Not to hijack the thread, but...   I also seldom use resource files, but I have searched in vain how to get around manifests, how do you do it without a resource file?
search -manifest:embed link.exe commandline option for latest linkers.
Thanks!  I'm still using tired old link 5 from 1998.  I look into getting a newer linker :)

jj2007

Quote from: jimg on November 24, 2018, 03:49:54 PMI have searched in vain how to get around manifests, how do you do it without a resource file?

Jim,

It's not impossible but impractical, see the Weird problem with UpdateResource thread. You can indeed add a resource to an existing exe, but it requires elevation, i.e. you need to insert the admin password every time you build a project as a normal user. At that point, having a standard manifest.rc is much easier.