467,867 Members | 1,354 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Share your developer knowledge by writing an article on Bytes.

manifest.xml a working example, C++11, Game Development

SwissProgrammer
128KB
The following is a manifest.xml file for use with C++11.

NOT for use with Visual Studio anything.
NOT for use with .NET anything.

It works for ME.

I am using some intense game graphics and process logic. I have found that Microsoft has been trying (for years) to lock programmers (outside of Visual Studio and .net) from using straight C++ as written by Stroustrup. I have been allowed to find another way to remove more of Microsoft's attempted blocks from my using C++.

For years, I used Visual Studio. I programmed in it for a long time. Now I am working toward quitting using Visual Studio and .net completely.

You should do the same.


Change the extension to the attached file from ".txt" to ".xml" .

Enjoy.


Expand|Select|Wrap|Line Numbers
  1. <!-- manifest.xml-->
  2. <!--
  3.  
  4.     The Manifest.xml file has no effect for Windows systems prior to XP.
  5.  
  6.     This "Application Manifest" is allowed to be included because
  7.  
  8.         Applications without a Compatibility section in their manifest will receive Windows Vista
  9.             behavior by default on Windows 7 and future Windows versions.
  10.  
  11.         Note that Windows XP and Windows Vista ignore this manifest section and it has no impact on them.
  12.  
  13.         DirectDraw Bit Block Transfer (Blt) to Primary without Clipping Window
  14.  
  15.             Windows 7 64 bit (and above?):
  16.             Applications manifested for Windows 7 are prevented from performing
  17.                 Blt's to the primary Desktop video buffer without a clipping window.
  18.             Doing so will result in an error and the Blt area will not be rendered.
  19.             Windows enforces this behavior even if you do not turn on Desktop Window Manager Composition.
  20.             Windows 7 compatible applications must Blt to a clipping window.
  21.  
  22.             Windows Vista (default) (and XP ?):
  23.             Applications must be able to Blt to the primary Desktop video buffer without a clipping
  24.                 window as legacy applications depend on this behavior.
  25.  
  26.             Running this application turns off the Desktop Windows Manager (for this program).
  27.  
  28.  
  29. The following works:
  30.  
  31. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  32. <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  33.   <dependency>
  34.     <dependentAssembly>
  35.       <assemblyIdentity
  36.         type="win32"
  37.         name="Microsoft.Windows.Common-Controls"
  38.         version="6.0.0.0"
  39.         processorArchitecture="x86"
  40.         publicKeyToken="6595b64144ccf1df"
  41.         language="*"/>
  42.     </dependentAssembly>
  43.   </dependency>
  44.   <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  45.     <security>
  46.       <requestedPrivileges>
  47.         <requestedExecutionLevel
  48.           level="asInvoker"
  49.           uiAccess="false"/>
  50.       </requestedPrivileges>
  51.     </security>
  52.   </trustInfo>
  53. </assembly>
  54.  
  55.  
  56. -->
  57.  
  58. <!-- Below is a simple example of an XP theme manifest for 32-bit applications:
  59.     with compatibility stuff-->
  60.  
  61.  
  62. <?xml
  63.     version="1.0"
  64.     encoding="UTF-8"
  65.     standalone="yes"
  66. ?>
  67.  
  68. <assembly
  69.     xmlns="urn:schemas-microsoft-com:asm.v1"
  70.     manifestVersion="1.0"
  71.     xmlns:asmv3=”urn:schemas-microsoft-com:asm.v3″>
  72.  
  73.     <assemblyIdentity
  74.         name="SingleBallBouncing"
  75.         version="1.0.0.0"
  76.         processorArchitecture="X86"
  77.         type="win32"
  78.     />
  79.  
  80.     <!--The following will supposedly not have any impact when run on previous operating systems-->
  81.     <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
  82.         <application>
  83.             <!-- Windows 10 -->
  84.                 <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
  85.             <!-- Windows 8.1 -->
  86.                 <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
  87.             <!-- Windows 8 -->
  88.                 <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
  89.             <!-- Windows 7 -->
  90.                 <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
  91.             <!-- Windows Vista -->
  92.                 <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
  93.     </compatibility>
  94.  
  95.  
  96.     <description>
  97.         Description of your application
  98.     </description>
  99.  
  100.  
  101.  
  102.     <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
  103.     <!-- On Windows XP sp 2 this exe compiles and runs with and WITHOUT the following dependency stuff. -->
  104.     <dependency>
  105.         <dependentAssembly>
  106.             <assemblyIdentity>
  107.                 type="win32"
  108.                 name="Microsoft.Windows.Common-Controls"
  109.                 version="6.0.0.0"
  110.                 <!--The following might be necessary for 7 and later operating systems. Maybe.-->
  111.  
  112.                 <!--"In order to get the common controls 6 visual styles, introduced with Windows XP"-->
  113.  
  114.                 <!--This seems to also work to allow a window that was designed for a small screen
  115.                    to be stretched a lot larger.
  116.                    (REFERENCE: https://community.teamviewer.com/t5/General-Questions/Remote-display-too-small-to-see/td-p/5351 )-->
  117.                 <!--This seems to work with DPI Scaling-->
  118.                 <!--This seems to fix Remote Desktop DPI scaling with high resolution laptops
  119.                    (REFERENCE: https://vworld.nl/?p=4468 )-->
  120.                 <!--This issue is caused by lack of not being DPI scaling aware of the Remote Desktop Client. (REFERENCE: https://vworld.nl/?p=4468 )-->
  121.  
  122.                 <!--How to get older programs to scale on HiDPI displays in Windows 10
  123.                    (REFERENCE: https://pocketnow.com/hidpi-scalling-in-windows-10 )-->
  124.                 publicKeyToken="6595b64144ccf1df"
  125.                 processorArchitecture="x86"
  126.                 language="*"
  127.             />
  128.         </dependentAssembly>
  129.     </dependency>
  130.  
  131.     <!--Also the following for DPI Scaling (REFERENCE: https://pocketnow.com/hidpi-scaling-in-windows-10 )-->
  132.     <!--Maybe this might be for when this executable is compiled on an amd64.
  133.         <dependency>
  134.             <dependentAssembly>
  135.                 <assemblyIdentity
  136.                     type=”win32″
  137.                     name=”Microsoft.VC90.CRT”
  138.                     version=”9.0.21022.8″
  139.                     processorArchitecture=”amd64″
  140.                     publicKeyToken=”1fc8b3b9a1e18e3b”>
  141.                 </assemblyIdentity>
  142.             </dependentAssembly>
  143.         </dependency>
  144.     -->
  145.  
  146.  
  147.     <!--Adding the trustInfo is not essential, but it has some valid use.
  148.         This supposedly will allow the .exe to get the correct version of the Windows operating system that
  149.            it is running on.
  150.         Some of the following is from https://en.wikipedia.org/wiki/Manifest_file#Application_and_assembly_manifest -->
  151.  
  152.     <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  153.         <security>
  154.             <requestedPrivileges>
  155.                 <!--
  156.                     asInvoker: The application will run with the same permissions as the process
  157.                        or user that started it. The application can be elevated to a higher
  158.                        permission level by selecting Run as Administrator.
  159.  
  160.                     highestAvailable:
  161.                        The application will run with the highest permission level that it can.
  162.                        If the user who starts the application is a member of the Administrators group,
  163.                           then this option is the same as requireAdministrator.
  164.                        If the highest available permission level is higher than the level of
  165.                           the opening process, then the system will prompt for credentials.
  166.  
  167.                     requireAdministrator:
  168.                        The application will run with administrator permissions.
  169.                        The user who starts the application must be a member of the Administrators group.
  170.                        If the opening process is not running with administrative permissions,
  171.                        then the system will prompt for credentials.
  172.  
  173.                     The uiAccess is for a "Windows Store" Application which
  174.                        is specified by the uiAccess attribute.
  175.  
  176.                     uiAccess
  177.                         (This applies to applications "apps" that are to be referenced by some as
  178.                            "SOLD" or "Leased" or etc. via a Microsoft web page store.)
  179.                            Standard Privilege Level (uiAccess="false"):
  180.                               Not for testing "Window's Store Applications".
  181.                            Extended Privilege Level (uiAccess="true"):
  182.                               Yes for testing "Window's Store Applications".
  183.  
  184.                         Generally, a "Window's Store Application" is an "app" that is ALLOWED to be SOLD via
  185.                             a Microsoft store for use on a Microsoft Windows operating system.
  186.  
  187.                         "Microsoft Store" (formerly known as "Windows Store")
  188.                            is a "digital distribution platform" owned by Microsoft,
  189.                            which is an online site that is owned by Microsoft.
  190.  
  191.                          Microsoft Store is curated (edited or filtered or policed by Microsoft),
  192.                             and apps must be certified for compatibility and content.
  193.  
  194.                          Microsoft takes a 30% cut of the app purchases,
  195.                             regardless of overall sales of the app.
  196.  
  197.                          Reference:  https://en.wikipedia.org/wiki/Microsoft_Store_%28digital%29
  198.                 -->
  199.  
  200.                 <!-- level='asInvoker'  =   Tells the Windows operating system that this program is
  201.                    okay to run with whatever security privilege level that the user currently has
  202.                    (It does not require access to special security.). -->
  203.  
  204.                 <!-- uiAccess='false'   =   Tells the Windows operating system that this is NOT
  205.                    a Windows Store Application.-->
  206.  
  207.                 <requestedExecutionLevel level='asInvoker' uiAccess='false' />
  208.  
  209.             </requestedPrivileges>
  210.         </security>
  211.     </trustInfo>
  212.  
  213. </assembly>
  214.  
Attached Files
File Type: txt mainfest.txt (9.3 KB, 86 views)
Jul 22 '20 #1
  • viewed: 3007
Share:

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Moosebumps | last post: by
1 post views Thread by vbian | last post: by
3 posts views Thread by =?Utf-8?B?cGNnYW1lcg==?= | last post: by
2 posts views Thread by t3chn0n3rd | last post: by
reply views Thread by Advertiser for `2D Games Development Central` | last post: by
6 posts views Thread by pereges | last post: by
7 posts views Thread by Benjamin Vigneaux | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.