How to remove manifest from precompiled dll

I have a pre-compiled dll dll that I need to remove or replace inline manifest. Is there a way that I can do this from the command line? I know it is possible to open a DLL in VS and just delete the manifest, but I would like to automate this process if possible.

+3


source to share


1 answer


Unfortunately, the standard mt.exe tool for working with manifests that comes with VS cannot remove them. But if you are familiar with C ++, it is fairly easy to write your own tool for this purpose.



You just need to call BeginUpdateResource with the given dll name, then UpdateResource with lpData = NULL and cbData = 0 to remove the given resource type (RT_MANIFEST) and EndUpdateResource to commit the changes.

+4


source







All Articles