Targetting a Windows Application for Windows 10

Hi, as you can read here:  [https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx] GetVersion and GetVersionEx are deprecated in latest Windows 8.1 and Windows 10.0. If you want your application capable to "discover" on which Windows version is running they suggest to use Version Helper API. Ok it is not difficult and till 8.1 all works fine. The problem is that now Windows 10 needs a specific manifest file to use the Version Helper Api, so we have to specify in that manifest the
 targetted windows versions (one by one). Now we have to create this manifest manually.

The question is this: is it planned to evolve the Project Parameters - Application section to let specify the targetted windows versions without creating a manual manifest file?

Regards
Davide Angeli
0
Davide
7/2/2015 9:45:21 AM
embarcadero.delphi.nativeapi 1236 articles. 1 followers. Follow

4 Replies
1748 Views

Similar Articles

[PageSpeed] 14
Get it on Google Play
Get it on Apple App Store

Davide wrote:

> Hi, as you can read here:
> [https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=v
> s.85).aspx] GetVersion and GetVersionEx are deprecated in latest
> Windows 8.1 and Windows 10.0. If you want your application capable to
> "discover" on which Windows version is running they suggest to use
> Version Helper API.

Or, you can manifest your app with the actual OS versions it really supports 
(ie, versions you have tested the app with), then GetVersion/Ex() will report 
the correct values for those versions.  That is documented behavior.

Otherwise, you have to use workarounds, such as querying the file version 
of system DLLs, or use NetWkstaGetInfo() with level=100 to get the version 
number of the local OS from the WKSTA_INFO_100 structure.

> Ok it is not difficult and till 8.1 all works fine. The problem is that now
> Windows 10 needs a specific manifest file to use the Version Helper Api

You need that manifest anyway in order to detect Windows 8.1, which is the 
version that changed GetVersionEx() to be manifest-aware.

> so we have to specify in that manifest the targetted windows versions
> (one by one). Now we have to create this manifest manually.

Yup.

> The question is this: is it planned to evolve the Project Parameters -
> Application section to let specify the targetted windows versions
> without creating a manual manifest file?

I doubt that, at least anytime soon.  That would require the IDE to generate 
its own manifests dynamically, something it does not do right now.  Its default 
manifest for enabling ComCtrl v6 for Visual Theming is hard-coded, anything 
beyond that requires the user to provide a custom manifest.  But it certainly 
would be nice if the IDE had some kind of built-in editor for populating 
the basic sections (Assemly info, Visual Themes, UAC, OS Compatibility, etc) 
and then allowed users to append additional custom manifest sections as needed. 
 This is how Visual Studio handles manifest generation.

-- 
Remy Lebeau (TeamB)
0
Remy
7/2/2015 7:27:54 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Davide wrote:
> 
> > The question is this: is it planned to evolve the Project Parameters -
> > Application section to let specify the targetted windows versions
> > without creating a manual manifest file?
> 
> I doubt that, at least anytime soon.  That would require the IDE to generate 
> its own manifests dynamically, something it does not do right now.  Its default 
> manifest for enabling ComCtrl v6 for Visual Theming is hard-coded, anything 
> beyond that requires the user to provide a custom manifest.  But it certainly 
> would be nice if the IDE had some kind of built-in editor for populating 
> the basic sections (Assemly info, Visual Themes, UAC, OS Compatibility, etc) 
> and then allowed users to append additional custom manifest sections as needed. 
>  This is how Visual Studio handles manifest generation.
> 

That would certainly be very nice to have. But, imagine customizing your manifest in that
way with horrendous Project Options dialog that is not capable of properly propagating
and/or clearing settings across different configurations. Having to set single link to
external manifest file can be troublesome enough.

-- 
Dalija Prasnikar
0
Dalija
7/2/2015 7:40:02 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Davide wrote:
> 
> > Hi, as you can read here:
> > [https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=v
> > s.85).aspx] GetVersion and GetVersionEx are deprecated in latest
> > Windows 8.1 and Windows 10.0. If you want your application capable to
> > "discover" on which Windows version is running they suggest to use
> > Version Helper API.
> 
> Or, you can manifest your app with the actual OS versions it really supports 
> (ie, versions you have tested the app with), then GetVersion/Ex() will report 
> the correct values for those versions.  That is documented behavior.
> 
> Otherwise, you have to use workarounds, such as querying the file version 
> of system DLLs, or use NetWkstaGetInfo() with level=100 to get the version 
> number of the local OS from the WKSTA_INFO_100 structure.
> 
> > Ok it is not difficult and till 8.1 all works fine. The problem is that now
> > Windows 10 needs a specific manifest file to use the Version Helper Api
> 
> You need that manifest anyway in order to detect Windows 8.1, which is the 
> version that changed GetVersionEx() to be manifest-aware.

Not properly true: in my tests VerifyVersionInfo API works fine with Win 8.1 without inserting a specific manifest in the EXE. The problem appears now with the new Windows 10 (I'm testing it on the latest  build 10159). GetVersion and GetVersionEx instead works only with the specific manifest in both Win8.1 and Win10 otherwise it return 6.2 always.

> 
> > so we have to specify in that manifest the targetted windows versions
> > (one by one). Now we have to create this manifest manually.
> 
> Yup.
> 
> > The question is this: is it planned to evolve the Project Parameters -
> > Application section to let specify the targetted windows versions
> > without creating a manual manifest file?
> 
> I doubt that, at least anytime soon.  That would require the IDE to generate 
> its own manifests dynamically, something it does not do right now.  Its default 
> manifest for enabling ComCtrl v6 for Visual Theming is hard-coded, anything 
> beyond that requires the user to provide a custom manifest.  But it certainly 
> would be nice if the IDE had some kind of built-in editor for populating 
> the basic sections (Assemly info, Visual Themes, UAC, OS Compatibility, etc) 
> and then allowed users to append additional custom manifest sections as needed. 
>  This is how Visual Studio handles manifest generation.

I totally agree: it would be nice to have something like Visual Studio. In some of my projects I need to change manifest options also to oblige "run as admin".


> 
> -- 
> Remy Lebeau (TeamB)

Thanks for the answer

Davide
0
Davide
7/3/2015 8:22:53 AM
Davide wrote:

> Not properly true: in my tests VerifyVersionInfo API works fine with
> Win 8.1 without inserting a specific manifest in the EXE. The problem
> appears now with the new Windows 10 (I'm testing it on the latest
> build 10159).

Yes, because Windows 10 changed VerifyVersionInfo() to be manifest-aware 
like GetVersionEx() is.

Just manifest your app, that is what Microsoft wants people to do.  We just 
have to live with it moving forward.

> GetVersion and GetVersionEx instead works only with the specific
> manifest in both Win8.1 and Win10 otherwise it return 6.2 always.

Yes, and that is documented behavior.

-- 
Remy Lebeau (TeamB)
0
Remy
7/6/2015 5:43:45 PM
Reply:

Similar Artilces:

How i call windows application in web application without using dll of windows application
i want to call Windows application in web Application Without using dll of Windows application in ASP.net 2.0  hi!try this: ProcessStartInfo pi = new ProcessStartInfo("app.exe"); pi.CreateNoWindow = true;  Process p = Process.Start(pi); p.WaitForExit(); if (p.ExitCode != 0){//report error } orzeh  code less, think more!...

Delphi applications and accent border in Windows 10
Question about running existing Delphi applications on Windows 10: In Win10 accent color is an additional border in all 4 directions around the selected window. In my delphi application sometimes the bottom part of the accent border is missing, while the accent color border is visible in the top, in the left and in the right side of the active window. It seems it has something to do with window height - at specific window height the bottom accent border disappears... Any idea what could be done to make accent border always visible regardless of the window size? I am using XE6. Thank...

calling windows explorer from a windows application
Hello, I was hoping someone knows of a way I can call windows explorer (explorer.exe) from a windows application using Vis. Studio 2003, Vis. Basic and asp.net 1.1?  What I need the application to do is call explorer.exe but have explorer.exe default to a specific directory each time. What I am currently doing is using SHELL to call explorer.exe and that work fine but I do not know how to make it come up in the spcific directory I want it to (the directory will never change). I am using it as a search function. I have tried creating a Shortcut to that directory and havin...

Calling Windows application from window service
Can any body tell me how to call windows application from window service???My Blog: DotNetError@BhatiaWorldDont forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. By windows application do you mean a desktop application? Console app? Call a web page? You're posting in ASP.Net so if I assume you mean how do you call an ASPX web page, for this you can use the WebRequest class. WebRequest req = WebRequest.Create("http://someserver/somepage.aspx");...

Starting windows application as a windows service
Hi I have a windows application developed in powerbuilder. I want to run application as a windows service in a special mode where there will not be any user interaction. Application just calls some nvo functions. Is it possible in any powerbuilder version? If not is there any workaround? Thanks Vinay There is nothing built directly into PB to support running as a service but there are APIs and third party tools such as E.Crane Computing's PBService utility or Microsoft's SVRANY utility. Such functionality may be exposed in .NET. You might be able to take advantage of th...

Window/Object attribute of other windows application
In some testing tools (e.g. SQA), they can get the window/object name and their attribute of most windows application. Can I do that using PB? Thank you for your advise. Regards, Peter This is a very general question, look up API calls. ie FindWindowA(), GetWindowText() Peter Lam wrote: > In some testing tools (e.g. SQA), they can get the window/object name and > their attribute of most windows application. Can I do that using PB? > > Thank you for your advise. > > Regards, > Peter -- Kenneth A. Drendel kdrendel@Hotmail.com Icq# 34027019...

Windows 10 and Delphi
It would be nice if MS would support Object Pascal http://www.nytimes.com/2015/01/19/technology/microsoft-looks-to-windows-10-for-a-jolt-in-the-mobile-realm.html ...

Windows 10 and Delphi
It would be nice if MS would support Object Pascal http://www.nytimes.com/2015/01/19/technology/microsoft-looks-to-windows-10-for-a-jolt-in-the-mobile-realm.html ...

Windows 10 and Delphi
So, this: https://www.youtube.com/watch?v=NfveyXCsiA8 WinRT may not be called WinRT but "Windows Store Apps" are not going away. Microsoft has been pushing and continues to push their Universal Apps as the first-class way to build software for Windows going forward, and it is now obvious that they are not limited to tablet-ey devices and will be front-and-center on the desktop (in windows, yay). Windows Phone may never amount to much from a market share standpoint but "Windows Store" already does. When it comes to consumer-level stuff, it's reasonable to th...

Windows 7 keyboard shortcuts for application windows
Is there any Delphi VCL who supports this new Win7 application arrow features? BTW: Delphi 2007 does not support this.. In short: You can also do the same thing by using simple keyboard shortcuts. Windows key + Left arrow = Move window to left side Windows key + Right arrow = Move window to right side Windows key + Up arrow = Maximize screen Windows key + Down arrow= Minimize screen More about on: http://www.ehow.com/how_5238320_use-keyboard-shortcuts-application-windows.html Hp > {quote:title=Hanspeter Widmer wrote:}{quote} > Is there any Delphi VCL who suppor...

Running a Windows Application on the Windows 2003 Server
Hi, I am assuming this is the right sub -forum since I'm sure it is security based, if not please move it. Basically here is my problem, I have a few Visual Basic 3 applications my Web Service has to interact with on the server, they produce reports that are sent back to the client (3rd party stuff can't do anything about it) The first one all it did was take two arguments and produce a text file, this took a while to get working but using this technique  http://codebetter.com/blogs/brendan.tompkins/archive/2004/05/13/13484.aspx I managed to get it working. Now the second...

Opening POPUP Windows from C# Windows application
Hi all,            I am opening Internet Explorer from C# Windows application by using SHDocVw.It is opening in Full screen. I want to open like a popup window(Without containing address bar,menu bar......).Please Provide me the solution.. RegardsNataraj           Since this is a Windows application question, you should ask your question on the MSDN Forums.RyanRyan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

Passing objects from windows application to windows service
Hi ALL I am making a shedeuling application in windows service. I have one windows application in vb.net . I want to pass a collection object from windows application to windows service. Can anybody tell me how it is possible ThanxThanks & Regards,Amit Batra...

Page 1 A Qualitative Study of =?windows-1252?Q?Mozilla=92s_P?= =?windows-1252?Q?rocess_Management_Practices_Technical_Report_?= =?windows-1252?Q?CS-2012-10?=
The Mozilla Anthropology1 project was started in late 2011 to examine how various Mozilla community stakeholders make use of Bugzilla in practice and to gain a sense of how Bugzilla could be improved in the future to better support the community. During this process, Martin Best interviewed 20 community members; we have split these 20 interviews into over 1,200 individual quotes and performed an open card sort to gain insight into high-level themes about Bugzilla to identify strengths, weaknesses, and ideas for future enhancement of the platform. During this process, four high-level ca...

Web resources about - Targetting a Windows Application for Windows 10 - embarcadero.delphi.nativeapi

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

New solution helps enterprises manage web applications
The shift towards the cloud means that running applications is now often done in a browser. While this is convenient for the end user it can ...

NASA is accepting astronaut applications, and this quiz will tell you if you qualify
... gone before, then you might want to sign up to be a NASA astronaut. On Dec. 14, for the first time in four years, NASA began accepting applications. ...

MBA: Mortgage Applications Increase in Latest MBA Weekly Survey, Purchase Applications up 29% YoY
From the MBA: Mortgage Applications Increase in Latest MBA Weekly Survey Mortgage applications increased 1.2 percent from one week earlier, ...

Falling Costs, Rising Applications Will Boost US Energy Storage Market
... in 2013 to 3,659MWh by 2020 on improving economics and policy developments, predicted GTM Research's Shayle Kann Falling Costs, Rising Applications ...

California Film & TV Tax Credits Applications Dip In New Small Screen Round
With production on the uptick in the home of Hollywood , the second round of those seeking small screen Golden State tax credits saw 32 applications ...

SMIC and M31 introduce differentiated IP solutions for storage controller applications
China-based IC foundry Semiconductor Manufacturing International (SMIC) has announced the company will expand its IP portfolio with M31 Technology's ...

Six internet-of-things applications in big new government trial
Manchester, England, is set to be the UK demonstrator city for internet-of-things innovation. Of course, there is much smart technology already ...

NASA accepting applications for the position of 'astronaut'
Wanted ads aren't usually newsworthy, unless the company is NASA and the job is "going to space." The US space agency has started recruiting ...

Apple Patent Application Hints at Waterproof iPhone
The patent application describes special rubber ports over headphone and other openings to protect them from water coming in.

Resources last updated: 12/15/2015 1:08:29 PM