LOL. Let's see: WinRT generics: Don't know much about this except that they don't seem to work yet. For example this code fails: Code: List<string> l = new List<string>(); Console.WriteLine(l.AsVector().Size); Also I tried to access the DirectUI application resource dictionary (for example) from C++ and didn't get anywhere. In any case I'm not surprised to see generics in WinRT. The fact that a type is generic should not affect the binary vtable layout so WinRT/COM couldn't care less if it's generic or not. It's up to the compilers to figure out the correct function signatures. WinRT events: They work pretty much the same as .NET events. You have add/remove_Event methods on the object that has events. For example, Application has an Activated event: Code: class IApplication : public IInspectable { ... HRESULT add_Activated(IActivatedEventHandler *, EventRegistrationToken *); HRESULT remove_Activated(EventRegistrationToken); ... }; class IActivatedEventHandler : public IUnknown { HRESULT Invoke(IUnknown *sender, IActivatedEventArgs *args); }; class IActivatedEventArgs : public IInspectable { public: ... HRESULT get_Content(IUIElement **value); HRESULT put_Content(IUIElement *value); }; WinRT static methods: This are implemented on an IXXXStatics interface on the WinRT activation factory: Code: class __declspec(uuid("60d7abca-4f1b-464d-96b7-792a7094f5a9")) IApplicationStatics : public IInspectable { ... HRESULT LoadComponent(IUnknown *component, void *uri); }; IApplicationStatics *appStatics; WinRTGetActivationFactory(appClassName.ref, __uuidof(IApplicationStatics), reinterpret_cast<void **>(&appStatics)); appStatics->LoadComponent(...); WinRT constructors: The WinMD files show that some WinRT types have constructors with parameters. I haven't tried but it's likely that this is implemented the same way as static methods, a IXXXFactory interface on the WinRT activation factory. WinRT async: He he, I wish I know how to use this properly. I did something like this: Code: var s = new StreamSocket(); var cop = s.ConnectAsync("localhost", "80", false); cop.Start(); while (cop.Status != AsyncStatus.Completed) ; Data data = new Data(); data.WriteString("GET / HTTP/1.1\r\nHost:localhost\r\n\r\n"); var wop = s.WriteAsync(data); wop.Start(); while (wop.Status != AsyncStatus.Completed) ; var rop = s.ReadAsync(1000, CompletionOption.PartialDataAvailable); rop.Start(); while (rop.Status != AsyncStatus.Completed) ; var d = rop.GetResults(); Console.WriteLine(d.ReadString()); but it's obviously far from ideal. I tried to use the Completed event handler on those async operations but it doesn't seem to be called. One thing that should be noted is that the Async methods are decorated with an AsyncCreate attribute. Maybe the compilers will do something with it.
Yay, slr100.dll is actually used. There's one dll named whealogr.dll, this dll existed in previous Windows versions and it exported 3 (native, of course) functions. In Win8 it still exports those 3 functions but the functions are implemented using SLR. For example WdiHandleInstance calls RhpReversePInvoke and RhpReversePInvokeReturn.
It's a DDK thing. so SLR is actually related to device drivers ? microsoft want to use a managed runtime to tackle crappy hardware/drivers and BSOD ?
Nope, can't be used for drivers because it uses usermode dlls (kernel32.dll). whealogr.dll appears to be used by the windows troubleshooter. It's interesting how small slr100.dll is (< 200k) while clr.dll is many megabytes in size. Basically they took the garbage collector from clr.dll and nothing more. There's probably no class loader, no metadata, no reflection, no app domains and no thread pool. There are some traces of pinvoke but the interop grunt work is probably done at compile time so the runtime doesn't need to do anything. Neat.
That's interesting. It does imply they expect DirectUI to be run within a web page environment though, which answers my question a little. But why would they have an attribute to specifically hide it from JS... strange.
Nope, it implies that WinRT objects can be accessed from javascript but some are blocked, probably due to security reasons. Not sure why you would want to use DirectUI from JavaScript anyway. If you want JavaScript, use HTML for UI. If you want DirectUI, use .NET or C++.
maybe its because System.Runtime.WindowsRuntime in this build is a little bit older than Windows.Foundation, code not merged form DevDiv yet. well, not related to your post but I just noticed StreamWebSocket class inside Windows.Networking.Sockets namespace, and the Windows.Networking.Sockets.dll call into WININET.dll for InternetWebSocketReceive / InternetWebSocketSend functions. so WebSocket is builtin. and actually in 7959 Windows.Devices.Proximity.Sockets have the same classes.
Well MS did say you can write first class Win8 apps with JS and HTML. If MS could leverage the skillset of all those HTML/JS-monkeys out there to instead write DirectUI XAML + JS in notepad, they'd have a great head start for their app store. At the end of the day it's all gonna be about the quantity and quality of the apps. JS could only help in that regard.
great work How did you wire up the Activated event when it's sealed in the DirectUI lib. I'm getting a "Windows.UI.DirectUI.Application.Activated" is not supported by the language.
you guys are finding very cool stuff, keep up the good work what about usermode drivers though? microsoft has been pushing people to move to usermode drivers for 'lighter' hardware, (ie, usb stuff, not graphics cards) perhaps this is an enabler for writing managed user mode drivers... that would be wild
Some quick answers: Indeed. Probably more stuff to come, after all whealogr.dll was "normal" back in 7850. Though now I'm wondering if SLR is intended for normal application use. I noted that slr100.dll exists only in the system32 directory in a x64 install, it doesn't exist in syswow64. That normally happens with dlls that are for system use only. I think he's using SharpDevelop and not VS. The difference is that SharpDevelop uses the .NET compiler which (in .NET 4.5) has been updated to support WinRT. VS uses its own, in process, compiler so it basically uses .NET4's compiler instead of the updated one. Maybe, but probably the guys who know js already know html and css and they probably won't bother with xaml. Possible. How many user mode drivers do actually exists?
The overall approach they're taking with .NET in Win8 is interesting though ... it's like they're splitting it into parts (metadata/type system, garbage collection, XAML) and using each one individually where they think it's appropriate.
i think there are a fair few out there, especially for usb devices.. hopefully there will be alot more if you can write them im managed code. also, when sensors become more prevalent in PCs, there will be more places for usermode drivers
Have you guys seen any more hints/figured out anything else about the security sandboxing? From the AppX schema and uxconsent.dll and stuff, it looks like they're implementing a system similar to smartphones where apps are prevented from interacting with each other and the system except through specific capabilities that they need to declare in the manifest and have the user accept on install. However this seems tricky since people are still going to want to run random legacy msi's and setup.exe's from the web (maybe that's one "advantage" of ARM though ...)
Windows Store For anyone interested heres the dependencies for the Windows Store dll's (WSClient.dll, WSService.dll, WSSync.dll, Windows.Store.dll) The WSClient.dll shows an interesting method "WSLicenseGetInAppOfferStatus" which I'm guessing is something like InApp purchase? Wild guess there. Also if it is it will be interesting to see how MS get around the whold LodSys suing all those appstore thirdparties offering similiar InApp purchase services. From NaiveUser's sluething on the WindowsStore application, we saw that the MSHelp.dll depends on WSClient.dll & WSSync.dll, which i think will be a regular pattern for all client apps, ie. an app will sync with the store thru these 2 dll's, getting there licenses and make store purchases etc. The WSService.dll got a bunch of dll methods, still trying to make sense what the role of that will play. I was hoping to find signs of thirdparty stores, or partner stores in the Store. I guess it's too early to see those bits, or there found in a completely different set of libraries.. Larger quality pics : http ://xs.to/media/6516 http ://xs.to/media/6517 http ://xs.to/media/6518 http ://xs.to/media/6519 http ://xs.to/media/6520 http ://xs.to/media/6521
Some random observations: .NET's NGEN service has been converted to a task (System32\Tasks\Microsoft\Windows\.NET Framework). Makes sense, this service doesn't run much anyway. There's a new System.IO.Compression.dll in .NET 4.5 which holds the ZipArchive class. GdiPlus.dll (aka System.Drawing) has been changed to use DirectWrite. Cool, gdiplus text rendering sucked.
here is the output of csc /? notice these lines: /target:appcontainerexe Build an Appcontainer executable (Short form: /t:appcontainerexe) /target:winmdobj Build a Windows Runtime intermediate file that is consumed by WinMDExp (Short form: /t:winmdobj) /platform:<string> Limit which platforms this code can run on: x86, Itanium, x64, arm, or anycpu. The default is anycpu. and I just created an appconainerexe with my Xaml demo, it just shows 'Element not found' when running, not sure whats changed yet. Code: Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.16698 Copyright (C) Microsoft Corporation. All rights reserved. Visual C# 2010 Compiler Options - OUTPUT FILES - /out:<file> Specify output file name (default: base name of file with main class or first file) /target:exe Build a console executable (default) (Short form: /t:exe) /target:winexe Build a Windows executable (Short form: /t:winexe) /target:library Build a library (Short form: /t:library) /target:module Build a module that can be added to another assembly (Short form: /t:module) /target:appcontainerexe Build an Appcontainer executable (Short form: /t:appcontainerexe) /target:winmdobj Build a Windows Runtime intermediate file that is consumed by WinMDExp (Short form: /t:winmdobj) /delaysign[+|-] Delay-sign the assembly using only the public portion of the strong name key /doc:<file> XML Documentation file to generate /keyfile:<file> Specify a strong name key file /keycontainer:<string> Specify a strong name key container /platform:<string> Limit which platforms this code can run on: x86, Itanium, x64, arm, or anycpu. The default is anycpu. - INPUT FILES - /recurse:<wildcard> Include all files in the current directory and subdirectories according to the wildcard specifications /reference:<alias>=<file> Reference metadata from the specified assembly file using the given alias (Short form: /r) /reference:<file list> Reference metadata from the specified assembly files (Short form: /r) /addmodule:<file list> Link the specified modules into this assembly /link:<file list> Embed metadata from the specified interop assembly files (Short form: /l) - RESOURCES - /win32res:<file> Specify a Win32 resource file (.res) /win32icon:<file> Use this icon for the output /win32manifest:<file> Specify a Win32 manifest file (.xml) /nowin32manifest Do not include the default Win32 manifest /resource:<resinfo> Embed the specified resource (Short form: /res) /linkresource:<resinfo> Link the specified resource to this assembly (Short form: /linkres) Where the resinfo format is <file>[,<string name>[,public|private]] - CODE GENERATION - /debug[+|-] Emit debugging information /debug:{full|pdbonly} Specify debugging type ('full' is default, and enables attaching a debugger to a running program) /optimize[+|-] Enable optimizations (Short form: /o) - ERRORS AND WARNINGS - /warnaserror[+|-] Report all warnings as errors /warnaserror[+|-]:<warn list> Report specific warnings as errors /warn:<n> Set warning level (0-4) (Short form: /w) /nowarn:<warn list> Disable specific warning messages - LANGUAGE - /checked[+|-] Generate overflow checks /unsafe[+|-] Allow 'unsafe' code /define:<symbol list> Define conditional compilation symbol(s) (Short form: /d) /langversion:<string> Specify language version mode: ISO-1, ISO-2, 3, or Default - MISCELLANEOUS - @<file> Read response file for more options /help Display this usage message (Short form: /?) /nologo Suppress compiler copyright message /noconfig Do not auto include CSC.RSP file - ADVANCED - /baseaddress:<address> Base address for the library to be built /bugreport:<file> Create a 'Bug Report' file /codepage:<n> Specify the codepage to use when opening source files /utf8output Output compiler messages in UTF-8 encoding /main:<type> Specify the type that contains the entry point (ignore all other possible entry points) (Short form: /m) /fullpaths Compiler generates fully qualified paths /filealign:<n> Specify the alignment used for output file sections /pdb:<file> Specify debug information file name (default: output file name with .pdb extension) /errorendlocation Output line and column of the end location of each error /nostdlib[+|-] Do not reference standard library (mscorlib.dll) /lib:<file list> Specify additional directories to search in for references /errorreport:<string> Specify how to handle internal compiler errors: prompt, send, queue, or none. The default is queue. /appconfig:<file> Specify an application configuration file containing assembly binding settings /moduleassemblyname:<string> Name of the assembly which this module will be a part of and, MSBuild displays this line for my winmd references: update : corresponding lines for vbc: and alink
Immersive WinMD namespace As per request here are the Immersive namespaces in the WinMetaData libs. These are all I've found, there could be more thou. It looks like an Immersive app is one that is 1. Loaded into an Immersive window - CreateImmersiveWindow found in twinapi.dll, this plain Win32 API 2. Can do Immersive things (like whats available in the immersive namespaces) However the fact it's important to get it's own namespace makes me wonder what the main distinction is between "Jupiter" and "Immersive" ... So still trying to work out what an "Immersive" app means, versus a "Jupiter" app.. High Quality Pic : http ://xs.to/media/6941