Win8 M3 (7989) findings relevant to Managed .net & WPF/SL developers

Discussion in 'Windows 8' started by SilverlightWPF, Jun 19, 2011.

  1. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    #161 NaiveUser, Sep 2, 2011
    Last edited by a moderator: Apr 20, 2017
    apparently you can't load assemblies dynamically at runtime if you are in 'StrictAppXMode'
    Code:
    // System.Reflection.Assembly
    [SecuritySafeCritical]
    [MethodImpl(MethodImplOptions.NoInlining)]
    public static Assembly Load(byte[] rawAssembly)
    {
    if (AppDomain.CurrentDomain.IsStrictAppXMode())
    {
    throw new NotSupportedException();
    }
    StackCrawlMark stackCrawlMark = StackCrawlMark.LookForMyCaller;
    return RuntimeAssembly.nLoadImage(rawAssembly, null, null, ref stackCrawlMark, false, SecurityContextSource.CurrentAssembly);
    }
    
    [SecuritySafeCritical]
    public static Assembly LoadFile(string path)
    {
    if (AppDomain.CurrentDomain.IsStrictAppXMode())
    {
    throw new NotSupportedException();
    }
    new FileIOPermission(FileIOPermissionAccess.Read | FileIOPermissionAccess.PathDiscovery, path).Demand();
    return RuntimeAssembly.nLoadFile(path, null);
    }
    
    [SecuritySafeCritical]
    [MethodImpl(MethodImplOptions.NoInlining)]
    public static Assembly LoadFrom(string assemblyFile)
    {
    if (AppDomain.CurrentDomain.IsStrictAppXMode())
    {
    throw new NotSupportedException();
    }
    StackCrawlMark stackCrawlMark = StackCrawlMark.LookForMyCaller;
    return RuntimeAssembly.InternalLoadFrom(assemblyFile, null, null, AssemblyHashAlgorithm.None, false, false, ref stackCrawlMark);
    }
    
    [SecuritySafeCritical]
    [MethodImpl(MethodImplOptions.NoInlining)]
    public static Assembly ReflectionOnlyLoad(byte[] rawAssembly)
    {
    if (AppDomain.CurrentDomain.IsStrictAppXMode())
    {
    throw new NotSupportedException();
    }
    StackCrawlMark stackCrawlMark = StackCrawlMark.LookForMyCaller;
    return RuntimeAssembly.nLoadImage(rawAssembly, null, null, ref stackCrawlMark, true, SecurityContextSource.CurrentAssembly);
    }
    
    [SecurityCritical]
    [MethodImpl(MethodImplOptions.NoInlining)]
    public static Assembly UnsafeLoadFrom(string assemblyFile)
    {
    if (AppDomain.CurrentDomain.IsStrictAppXMode())
    {
    throw new NotSupportedException();
    }
    StackCrawlMark stackCrawlMark = StackCrawlMark.LookForMyCaller;
    return RuntimeAssembly.InternalLoadFrom(assemblyFile, null, null, AssemblyHashAlgorithm.None, false, true, ref stackCrawlMark);
    }
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    #162 NaiveUser, Sep 2, 2011
    Last edited by a moderator: Apr 20, 2017
    apparently there is some feature about wave audio in Silverlight 5 that has a code name "HillClimbing", maybe the 'Trick Play' or Sound Effect feature ?
    something inside coreclr.dll
    Code:
    HillClimbing_SampleIntervalLow
    HillClimbing_ErrorSmoothingFactor
    HillClimbing_TargetSignalToNoiseRatio
    HillClimbing_MaxWaveMagnitude
    HillClimbing_WaveMagnitudeMultiplier
    HillClimbing_Bias
    HillClimbing_WaveHistorySize
    HillClimbing_MaxChangePerSample
    HillClimbing_MaxChangePerSecond
    HillClimbing_MaxSampleErrorPercent
    HillClimbing_GainExponent
    HillClimbing_SampleIntervalHigh
    HillClimbing_WavePeriod
    these stuff also presents in the clr.dll in Win8
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    #163 NaiveUser, Sep 3, 2011
    Last edited by a moderator: Apr 20, 2017
    some stuff inside Microsoft.Common.targets
    Code:
      <PropertyGroup>
        <TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">.NETFramework</TargetFrameworkIdentifier>
        <TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.0</TargetFrameworkVersion>
      </PropertyGroup>
      <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'WindowsImmersive'">
        <TargetPlatformVersion Condition="'$(TargetPlatformVersion)' == ''">8.0</TargetPlatformVersion>
        <AvailablePlatforms>$(AvailablePlatforms),ARM</AvailablePlatforms>
      </PropertyGroup>
    
    WindowsImmersive ????
    currently $(TargetFrameworkIdentifier) can has values like ".NETFramework" or "Silverlight", apparently we will see a 'WindowsImmersive' framework in VS11. And 8.0 is the version of Windows SDK.
    Code:
      <PropertyGroup>
        <!-- This does not exist in v10 and below -->
        <MsAppxPackageTargets Condition="'$(MsAppxPackageTargets)'==''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets</MsAppxPackageTargets>
      </PropertyGroup>
    
      <Import Project="$(MsAppxPackageTargets)" Condition="Exists('$(MsAppxPackageTargets)')" />
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. lionelmessi

    lionelmessi MDL Novice

    Sep 10, 2011
    5
    0
    0
    look at Program Files\Microsoft\Windows.glcnd\ lots of XAML files.
     
  5. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. bored_neo

    bored_neo MDL Junior Member

    Jun 3, 2011
    53
    26
    0
    Well, no suprises here, what they did there is really a hack.

    Now that's a surprise! A rather cool solution though I have the feeling that C++ fanatics will go amok. Oh well...
     
  8. compaq66

    compaq66 MDL Novice

    Oct 2, 2008
    39
    2
    0
    windows 8

    well people i got windows 8 from my msdn account , i'll tel you what is like after i screw with it some , be back this week ned ..compaq66:biggrin:
     
  9. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Aethec

    Aethec MDL Novice

    Jun 24, 2011
    4
    2
    0
    ...wait. Isn't that one of the fundamental principles of the "Singularity" project?
    Also, they spoke about "contracts" in the keynote, which is another element found in Singularity. :eek:
     
  11. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    ahh.... if you are talking about very very high level abstract concepts and philosophy, yes they might be some similiarity to Singularity, and a lot of other things too. But technically, its complete not related to Singularity. ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    #172 NaiveUser, Sep 16, 2011
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. gecebilgisayar

    gecebilgisayar MDL Novice

    Sep 16, 2011
    5
    0
    0
  14. Aethec

    Aethec MDL Novice

    Jun 24, 2011
    4
    2
    0
    Technically, no. But the fact is shares ideas with Singularity makes me think WinRT was designed to be compatible with Singularity/Midori/whatever comes after NT, without having to rewrite apps.
     
  15. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    No. Application contracts in WinRT is completely unrelated to the channel contracts in Singularity, totally, completely, not related. Especially not about application compatibility with Singularity or anything.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    An update on an old post.

    This is 8102 Windows.UI.Xaml.
    This is 7989 DirectUI
    and this is Silverlight agcore_debug.dll
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...