Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9571
| From | "Claus Wagner" <cwagner@laufwerk.net> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Windows 10 compatibility |
| Date | 2016-08-01 11:23 +0200 |
| Organization | albasani.net |
| Message-ID | <nnn4es$ee5$1@news.albasani.net> (permalink) |
| References | <nkt95q$45e$1@dont-email.me> <dterkiFslp8U1@mid.individual.net> <nniljo$snl$1@news.albasani.net> <e07ui1Fu63kU1@mid.individual.net> |
Thank you very much, Wolfgang!
One hint:
<< lReturn := Logic( _Cast, PCall( ptrFunction, @strWinOsVersionInfo ) )
is setting lReturn to FALSE, because RtlGetVersion returns 0
(STATUS_SUCCESS).
Claus
"Wolfgang Riedmann" schrieb im Newsbeitrag
news:e07ui1Fu63kU1@mid.individual.net...
Hi Claus,
> do you have an example, how to use RtlGetVersion in VO?
of course:
method Refresh() class clsOsVersion
local strWinOsVersionInfo is _WinOSVersionInfoEx
local oVersion as GetWindowsVersion
local cMessage as string
local nVersion as dword
local lReturn as logic
local ptrFunction as ptr
local ptrHandle as ptr
local lRtlGetVersion as logic
strWinOsVersionInfo.dwOSVersionInfoSize := _sizeof( _WINOSVERSIONINFOEX
)
if ( ptrHandle := GetModuleHandle( String2Psz( "ntdll" ) ) ) !=
null_ptr .and. ( ptrFunction := GetProcAddress( ptrHandle, String2PSZ(
"RtlGetVersion" ) ) ) != null_ptr
lReturn := Logic( _Cast, PCall( ptrFunction, @strWinOsVersionInfo ) )
lRtlGetVersion := true
else
lReturn := GetVersionEx( @strWinOsVersionInfo )
lRtlGetVersion := false
endif
// Get the Version Info's from the OS
nMajorVersion := strWinOsVersionInfo.dwMajorVersion
nMinorVersion := strWinOsVersionInfo.dwMinorVersion
if nMajorVersion >= 6 .and. lRtlGetVersion == false // ab Windows 8
kann Windows "lügen", aber nicht mit RtlGetVersion()
oVersion := GetWindowsVersion{}
if oVersion:nMajor > 0 .and. oVersion:nMajor != nMajorVersion
nMajorVersion := oVersion:nMajor
nMinorVersion := oVersion:nMinor
endif
endif
nBuildNumber := strWinOsVersionInfo.dwBuildNumber
nPlatformId := strWinOsVersionInfo.dwPlatformId
//szCSDVersion := strWinOsVersionInfo.szCSDVersion
for nVersion := 1 upto 128
szCSDVersion[nVersion] := strWinOsVersionInfo.szCSDVersion[nVersion]
next
nServicePackMajor := strWinOsVersionInfo.wServicePackMajor
nServicePackMinor := strWinOsVersionInfo.wServicePackMinor
nSuiteMask := strWinOsVersionInfo.wSuiteMask
nProductType := strWinOsVersionInfo.wProductType
HTH
Wolfgang
>
> Claus
>
>
> "Wolfgang Riedmann" schrieb im Newsbeitrag
> news:dterkiFslp8U1@mid.individual.net...
>
> Hi Arne,
>
> using this manifest has some side effects: if you try to write to the
> Windows directory with an application using this manifest, a write
> error will be returned. If you use an application without this
> manifest, the file will be written into the VirtualStore location.
>
> Fortunately there is another function, RtlGetVersion(), that does
> return the right Windows version independently from a present
> manifest.
>
> Wolfgang
>
> P.S. I'm manifesting my applications for nearly two years, and had
> found a few places where I was writing to the Windows directory. I
> have to admit that all these applications were at least 15 years old.
>
>
> > Some time ago someone in one forum has proposed to add "Windows 10
> > compatibility" to the programs as in the attached manifest.
> >
> > I did it for VO and Vulcan programs and it works. The WinAPI
> > function GetVersionEx returns 10 instead of 6.2 or 6.3. Users that
> > use the Bbrowser have to make a change in the function
> > bGetOSVersionID. Otherwise the browsers thinks that the Windows
> > version is an old one and ignores the alpha blending effects.
> >
> > Apart from the change of the GetVersionEx I haven't found any
> > differences yet and haven't found any documentation what could be
> > different. Nevertheless I find it good to show full compatibilty.
> >
> > Arne Ortlinghaus
> > ACS Data Systems
--
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
Windows 10 compatibility "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2016-06-28 09:32 +0200
Re: Windows 10 compatibility "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-28 10:42 +0200
Re: Windows 10 compatibility "Claus Wagner" <cwagner@laufwerk.net> - 2016-07-30 18:45 +0200
Re: Windows 10 compatibility "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-08-01 05:38 +0200
Re: Windows 10 compatibility "Claus Wagner" <cwagner@laufwerk.net> - 2016-08-01 11:23 +0200
csiph-web