Embed manifest file to require administrator execution level with mingw32

后端 未结 2 1663
时光取名叫无心
时光取名叫无心 2021-02-20 15:13

I\'m cross compiling an application with i586-mingw32msvc under ubuntu.

I\'m having difficulties understanding how to embed a manifest file to require administrator exec

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-20 15:30

    With regard to the magic voodoo numbers 1 and 24:

    1 24 "hello.exe.manifest"
    

    That line translates to somthing like this:

    ID_MANIFEST RT_MANIFEST "hello.exe.manifest"
    

    where those defines are as defined as follows:

    #define ID_MANIFEST 1
    #ifndef RT_MANIFEST
    #define RT_MANIFEST MAKEINTRESOURCE(24)
    #endif
    

    As shown above by the conditional wrappers, the RT_MANIFEST might already be defined and if you do a Google search for that RT_MANIFEST term you will find lots of hits with more details on what is going on.

提交回复
热议问题