Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9384 > unrolled thread

CAVO28 tip about manifest file in Win 10 Redstone

Started by"Jean Raymond" <jean_ray67@hotmail.com>
First post2016-05-30 11:33 -0400
Last post2016-05-31 17:17 +0200
Articles 4 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  CAVO28 tip about manifest file in Win 10 Redstone "Jean Raymond" <jean_ray67@hotmail.com> - 2016-05-30 11:33 -0400
    Re: CAVO28 tip about manifest file in Win 10 Redstone "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-05-31 07:44 +0200
    Re: CAVO28 tip about manifest file in Win 10 Redstone "Karl-Heinz" <invalid@invalid.invalid> - 2016-05-31 16:19 +0200
      Re: CAVO28 tip about manifest file in Win 10 Redstone "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-05-31 17:17 +0200

#9384 — CAVO28 tip about manifest file in Win 10 Redstone

From"Jean Raymond" <jean_ray67@hotmail.com>
Date2016-05-30 11:33 -0400
SubjectCAVO28 tip about manifest file in Win 10 Redstone
Message-ID<nihmgu$sal$1@dont-email.me>
Hello ALL...
I had problem with in the development environment with OS version [ 
GetVersionEx() ] and access to registry.
Since you may have cavo28.exe file compiled with win7 or 8, then you must 
add the following file
into this program folder.
Note1:
cavo28.exe MUST NOT be set as compatibility lower than win10....
Note2:
You must also add this file to the resource module into your futur .EXE as:
RESOURCE  CREATEPROCESS_MANIFEST_RESOURCE_ID  RC_RT_MANIFEST 
%appwizdir%\cctl-Win10.man

cctl-Win10.man is the same file as the following file:

cavo28.exe.manifest
//--------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="X86"
    name="VO.Application"
    type="win32"
/>
<description>Visual Objects Application.</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
            <!-- Windows 10 -->
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
            <!-- Windows 8.1 -->
            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
            <!-- Windows Vista -->
            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
            <!-- Windows 7 -->
            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
            <!-- Windows 8 -->
            <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
    </application>
</compatibility>

</assembly>
//--------------------------------------------------
ref:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx

Best regards
Jean Raymond
http://www.rayonline.com/cmvodbx32.html

[toc] | [next] | [standalone]


#9385

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2016-05-31 07:44 +0200
Message-ID<dr4mmbF17rhU1@mid.individual.net>
In reply to#9384
Hi Jean,

before adding this to your manifest, (I prefer it compiled in the exe
instead of adding it only), you must make sure that your application is
effectively ready for these operating systems, for example not writing
to the system folders or writing to Windows.ini.

If you manifest compatibility with Windows 7, 8, 8.1 or 10, these
writes will fail. If you don't have this manifest, these writes will be
redirected tothe VirtualStore directory in the users profile.

Wolfgang

Jean Raymond wrote:

> Hello ALL...
> I had problem with in the development environment with OS version [
> GetVersionEx() ] and access to registry.  Since you may have
> cavo28.exe file compiled with win7 or 8, then you must add the
> following file into this program folder.  Note1:
> cavo28.exe MUST NOT be set as compatibility lower than win10....
> Note2:
> You must also add this file to the resource module into your futur
> .EXE as:  RESOURCE  CREATEPROCESS_MANIFEST_RESOURCE_ID
> RC_RT_MANIFEST %appwizdir%\cctl-Win10.man
> 
> cctl-Win10.man is the same file as the following file:
> 
> cavo28.exe.manifest
> //--------------------------------------
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <assembly xmlns="urn:schemas-microsoft-com:asm.v1"
> manifestVersion="1.0"> <assemblyIdentity
>    version="1.0.0.0"
>    processorArchitecture="X86"
>    name="VO.Application"
>    type="win32"
> />
> <description>Visual Objects Application.</description>
> <dependency>
>    <dependentAssembly>
>        <assemblyIdentity
>            type="win32"
>            name="Microsoft.Windows.Common-Controls"
>            version="6.0.0.0"
>            processorArchitecture="X86"
>            publicKeyToken="6595b64144ccf1df"
>            language="*"
>        />
>    </dependentAssembly>
> </dependency>
> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
>    <application>
>            <!-- Windows 10 -->
>            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
>            <!-- Windows 8.1 -->
>            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
>            <!-- Windows Vista -->
>            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
>            <!-- Windows 7 -->
>            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
>            <!-- Windows 8 -->
>            <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
>    </application>
> </compatibility>
> 
> </assembly>
> //--------------------------------------------------
> ref:
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs
> .85).aspx
> https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs
> .85).aspx
> 
> Best regards
> Jean Raymond
> http://www.rayonline.com/cmvodbx32.html



-- 

[toc] | [prev] | [next] | [standalone]


#9389

From"Karl-Heinz" <invalid@invalid.invalid>
Date2016-05-31 16:19 +0200
Message-ID<dr5ku5F76t8U2@mid.individual.net>
In reply to#9384
Hi Jean,

beside your manifest advice ..


1. There´s a Set of Helperfunction to detect the OS-Version.

https://msdn.microsoft.com/en-us/library/windows/desktop/dn424972%28v=vs.85%29.aspx.

Though there´s a macro to detect Win10 via  "IsWindows10OrGreater" the docs
say:

"Indicates if the current OS version matches, or is greater than, the
Windows 10 version.For Windows 10, IsWindows10OrGreater
returns false unless the application contains a manifest that
includes a compatibility section that contains the GUID that designates
Windows 10."

funny ....


2. Use the RtlGetVersion() Kernel function: No matter if a app is manifested
or not. RtlGetVersion() returns the current OS:


FUNCTION GetOsVersion( dwMajor REF DWORD  , dwMinor REF DWORD , dwBuild REF
DWORD ) AS LOGIC  PASCAL
LOCAL s IS  _winOSVERSIONINFOEX
LOCAL hFunc AS PTR
LOCAL lOk AS LOGIC


// _DLL FUNCTION RtlGetVersion ( s AS _WINOSVERSIONINFOEX ) AS DWORD
PASCAL:Ntdll.RtlGetVersion

    s.dwOSVersionInfoSize:= _SIZEOF ( _WINOSVERSIONINFOEX )


    IF ( hFunc := GetProcAddress(  GetModuleHandle( String2Psz ("Ntdll") ) ,
String2Psz ( "RtlGetVersion" ))) != NULL_PTR

            IF ( DWORD ( _CAST , PCALL ( hFunc , @s ) ) ) == 0

                dwMajor := s.dwMajorVersion
                dwMinor := s.dwMinorVersion
                dwBuild := s.dwBuildNumber


                lOk := TRUE

            ENDIF

    ENDIF

RETURN  lOk



regards
Karl-Heinz 

[toc] | [prev] | [next] | [standalone]


#9390

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2016-05-31 17:17 +0200
Message-ID<dr5o81F7scaU1@mid.individual.net>
In reply to#9389
Hi Karl-Heinz,

> 1. There´s a Set of Helperfunction to detect the OS-Version.
> 
> https://msdn.microsoft.com/en-us/library/windows/desktop/dn424972%28v=
> vs.85%29.aspx.
> 
> Though there´s a macro to detect Win10 via  "IsWindows10OrGreater"
> the docs say:
> 
> "Indicates if the current OS version matches, or is greater than, the
> Windows 10 version.For Windows 10, IsWindows10OrGreater
> returns false unless the application contains a manifest that
> includes a compatibility section that contains the GUID that
> designates Windows 10."
> 
> funny ....


I can confirm that this helper function returns incorrect values if the
application is not manifested correctly.

> 2. Use the RtlGetVersion() Kernel function: No matter if a app is
> manifested or not. RtlGetVersion() returns the current OS:

Cool!  I don't knew this one! I'll have to try, thank you very much!

Wolfgang

-- 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web