Embedding a Manifest into a .dll

Hi All,

I need to embed a manifest file into my .dll (so that the parent app will know about my addin).

If I was using Visual Studio, I would add this line to the Post Build Event Command Line dialog

mt.exe -manifest “$(ProjectDir)OEMTestAddin.X.manifest” -outputresource:“$(TargetPath)”;#2

As I am using Delphi, and I already have a .RC file that adds button bitmaps to the .dll, I think this is where I should attempt to add the manifest file.

I believe it would look something like this - but I simply do not know exactly what it should be:
#define RT_MANIFEST 24
#define APP_MANIFEST 1
APP_MANIFEST RT_MANIFEST “Inv2024Idf.X.Manifest”

Have anybody needed to do anything like this?

regards

Brian

Hi Brian

FinalBuilder can do this for you

Vincent,

Thanks for that, it will help when doing the build, but I am hoping we can add the manifest when we compile so the parent app will load the . dll and we can use debug.

regards

Brian


From: Vincent noreply@adug.org.au
To: brian brian@desktop-eda.com.au
Date: Wednesday, 2 August 2023 10:32 AM AEST
Subject: [ADUG Forums] Embedding a Manifest into a .dll

| vincent Vincent Parrett Forum Wrangler
2 August |

  • | - |

Hi Brian

FinalBuilder can do this for you

finalbuilder.com

Windows Manifest Files

In this post I’m going to look at Windows Manifest Files, what they do, why we need them and how to use them in Delphi and FinalBuilder. We often get


Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.

Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
https://www.mailguard.com.au/mg

Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
https://www.mailguard.com.au/mg

You can just add this to a .rc and compile to .res using rc.exe

1 24 "E:\\Source\\app\\myapp.manifest"

and then reference the .rc file somewhere in your dll source.

Vincent,

Thanks, that bit of info was all we needed. Here is the actual line of code we used:

1 RT_MANIFEST “Inv2024Idx.X.Manifest”

and here what we we see in the .dll resources

I have always been baffled by anything to do with resources and .RC files. Until I see an example, I get nowhere.

Anything that is written on the subject seem to be written on the basis that you already know all about them.

regards

Brian

Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
https://www.mailguard.com.au/mg

1 Like

An alternative is to use the project options dialog and selecting “Custom”.

FWIW, the blog post I directed Brian to suggested

For the versions of Rad Studio that support specifying a custom manifest file, just do that. For versions without custom manifest support, uncheck the “Enable runtime themes” option, and add a resource to your project that includes the manifest