News:

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

Main Menu

manifest

Started by jimg, March 08, 2024, 12:23:52 AM

Previous topic - Next topic

jimg

An excellent suggestion.  Thanks!

jimg

maybe not.
now I get

POLINK: fatal error: File not found: ''-manifestdependency:type=Win32.obj'.

Vortex

Hi jimg,

Reading Pelles manual :

Quote/MANIFESTDEPENDENCY option (POLINK) [5.00]
 
Syntax:
/MANIFESTDEPENDENCY:dependency

Description:

The /MANIFESTDEPENDENCY option adds a dependency to the manifest created by the /MANIFEST option. The linker will not validate the dependency argument, the string is written as specified to the manifest. Since the dependency usually contain spaces the entire option, or the dependency argument, must be enclosed in single or double quotation marks: "/MANIFESTDEPENDENCY:string with spaces" or /MANIFESTDEPENDENCY:"string with spaces".

When the /MANIFESTDEPENDENCY option is used the /MANIFEST option is implied.

Here is an example of a dependency (note the use of both single and double quotation marks):

/MANIFESTDEPENDENCY:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"

See Microsoft Windows documentation for more information about manifests.
Could you check this article?

https://learn.microsoft.com/en-us/cpp/build/reference/manifestdependency-specify-manifest-dependencies?view=msvc-170

jimg

okay, this is entirely new.
does this go in the asm file where the other one was?
do I need quotes around the /MANIFESTDEPENDENCY:"typ.... within the .drectve segment info block?  Everything else seems to be within single or double quotes.

jimg

So I put everything back and it doesn't work anymore  :sad:
No idea what's different.

jimg

okay, all back together.

Ended up using version 8.00 of polink from 3/21/2015

Vortex

Hi jimg,

Here is another attempt. First of all, thanks to Sinsi for sharing his response file embedding manifests :

myfile.rsp
/manifest:embed
/manifestdependency:"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"
/manifestuac:"level='asInvoker' uiAccess='false'"

Here are what I did :

 - I removed the drectve section from my source file.
 - Following Sinsi's response files, I edited my batch file :

\masm32\bin\ml /c /coff EmbedManifest.asm
\masm32\bin\polink /SUBSYSTEM:WINDOWS EmbedManifest.obj /manifest:embed /manifestdependency:"type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" /manifestuac:"level='asInvoker' uiAccess='false'"

  - Object module linked with Pelles Linker, Version 12.00.0
  - After building the project, I extracted the manifest file with Resource Hacker V5.2.7 Build 427 :

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*' />
    </dependentAssembly>
  </dependency>
</assembly>

Vortex

Hi jimg,

Returning back to the drectve section method supported by Uasm :

.drectve SEGMENT INFO
    db 34,"-manifestdependency:type='Win32'"
    db " name='Microsoft.Windows.Common-Controls'"
    db " version='6.0.0.0'"
    db " processorArchitecture='*'"
    db " publicKeyToken='6595b64144ccf1df'"
    db " language='*'", 34
    db " -manifestuac:",34,"level='asInvoker' uiAccess='false'",34
    db " -manifest:embed "
.drectve ENDS

jj2007

Quote from: Vortex on March 09, 2024, 08:40:38 PMReturning back to the drectve section method supported by Uasm :

This is weird. Without OPTION DOTNAME, UAsm accepts (i.e. throws no error for) drectve SEGMENT INFO without the dot but it has no effect :rolleyes:

So this works with polink version 8 but not version 9:
OPTION DOTNAME
.drectve SEGMENT INFO
    db 34,"-manifestdependency:type='Win32'"
    db " name='Microsoft.Windows.Common-Controls'"
    db " version='6.0.0.0'"
    db " processorArchitecture='*'"
    db " publicKeyToken='6595b64144ccf1df'"
    db " language='*'", 34
    db " -manifestuac:",34,"level='asInvoker' uiAccess='false'",34
    db " -manifest:embed "
.drectve ENDS
end WinMain ; (or start, whatever)


jimg

It worked!

Many thanks to both of you guys for time and patience and expertise :)