From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Platform:Windows Runtime" |
|---|
| claim | "Activation of a WinRT class by name: RoGetActivationFactory(HSTRING, IID, out); on CO_E_NOTINITIALIZED start an MTA (CoIncrementMTAUsage) and retry; if that fails, strip the last dotted component of the class name, append .dll, load it and call its export DllGetActivationFactory(HSTRING, IActivationFactory**), trying A.B.dll then A.dll for A.B.Type." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Windows Runtime" |
|---|
| observed_in | |
|---|
|
|---|
| data | | function | "RoGetActivationFactory" |
|---|
| trigger | "a projection constructs or calls a static method of a WinRT class such as L"Windows.Foundation.Uri"" |
|---|
| effect | "returns the class's activation factory from the registered server or from a component DLL" |
|---|
| condition | "windows-rs tries the DLL fallback only when the result is REGDB_E_CLASSNOTREG; C++/WinRT tries it after any failure" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "load_factory, search_path, get_activation_factory" |
|---|
| repo | "https://github.com/microsoft/windows-rs" |
|---|
| commit | "20f6de7473ebb2761a19a73dcc2c25ac9499db6e" |
|---|
| path | "crates/libs/core/src/imp/factory_cache.rs" |
|---|
| lines | "64-170" |
|---|
|
| type | "source" |
|---|
| detail | "get_runtime_activation_factory_impl" |
|---|
| repo | "https://github.com/microsoft/cppwinrt" |
|---|
| commit | "856eaff70a48d6b053c2ad3dffec15b81ca34b10" |
|---|
| path | "strings/base_activation.h" |
|---|
| lines | "20-90" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "WinRT activation path" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T19:24:27.805Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:34:55.382Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read factory_cache.rs load_factory/search_path/get_activation_factory (windows-rs 20f6de74, whole file) and cppwinrt strings/base_activation.h get_runtime_activation_factory_impl (856eaff7, lines 1-110). windows-rs: DLL fallback only when code == REGDB_E_CLASSNOTREG; C++/WinRT: after any failure of RoGetActivationFactory (after the CO_E_NOTINITIALIZED retry), loop strips last dotted component, appends .dll, calls DllGetActivationFactory." |
|---|
| notes | "C++/WinRT first calls winrt_activation_handler if one is set; windows-rs loads with LOAD_LIBRARY_SEARCH_DEFAULT_DIRS." |
|---|
|
|
|---|