зеркало из https://github.com/microsoft/xlang.git
Update read me with more info (#680)
Update Readme for the nuget package to have instruction on how to use it.
This commit is contained in:
Родитель
395658cf89
Коммит
b18eb1e324
|
@ -7,7 +7,27 @@ Installing this package will enable non-packaged desktop applications
|
||||||
to leverage user-defined Windows Runtime types via the use of the
|
to leverage user-defined Windows Runtime types via the use of the
|
||||||
application manifest down to RS2.
|
application manifest down to RS2.
|
||||||
|
|
||||||
|
To achieve this, the package uses the detours library, detouring RoActivateInstance, RoGetActivationFactory,
|
||||||
|
RoGetMetadataFile, and RoResolveNamespace and reimplementing the RegFree WinRT feature that is avaibale on windows version 19h1 and above.
|
||||||
|
The package will automatically place winrtact.dll to your build folder where your exe should be.
|
||||||
|
|
||||||
|
Initializing the detours on winrtact.dll
|
||||||
|
- Native
|
||||||
|
Initialization of the dll is taken care of automatically through ForceSymbolReferences.
|
||||||
|
|
||||||
|
- Managed
|
||||||
|
For Managed code, one will need to call DllImport on winrtact.dll and extern winrtact_Initialize().
|
||||||
|
|
||||||
|
[DllImport("winrtact.dll")]
|
||||||
|
static extern void winrtact_Initialize();
|
||||||
|
|
||||||
|
winrtact_Initialize() needs to be called on startup to initialize the detours and load the catalog.
|
||||||
|
|
||||||
|
|
||||||
Example application manifest:
|
Example application manifest:
|
||||||
|
Your application manifest should have the same name as, and be side by side to your executable.
|
||||||
|
<your_exe_name>.exe.manifest
|
||||||
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
|
|
@ -6,6 +6,28 @@ Enable non-packaged desktop applications
|
||||||
to leverage user-defined Windows Runtime types via the use of the
|
to leverage user-defined Windows Runtime types via the use of the
|
||||||
application manifests down to RS2.
|
application manifests down to RS2.
|
||||||
|
|
||||||
|
To achieve this, the package uses the detours library, detouring RoActivateInstance, RoGetActivationFactory,
|
||||||
|
RoGetMetadataFile, and RoResolveNamespace and reimplementing the RegFree WinRT feature that is avaibale on windows version 19h1 and above.
|
||||||
|
The package will automatically place winrtact.dll to your build folder where your exe should be.
|
||||||
|
|
||||||
|
Initializing the detours on winrtact.dll
|
||||||
|
- Native
|
||||||
|
Initialization of the dll is taken care of automatically through ForceSymbolReferences.
|
||||||
|
|
||||||
|
- Managed
|
||||||
|
For Managed code, one will need to call DllImport on winrtact.dll and extern winrtact_Initialize().
|
||||||
|
```
|
||||||
|
[DllImport("winrtact.dll")]
|
||||||
|
static extern void winrtact_Initialize();
|
||||||
|
```
|
||||||
|
winrtact_Initialize() needs to be called on startup to initialize the detours and load the catalog.
|
||||||
|
|
||||||
|
|
||||||
|
Example application manifest:
|
||||||
|
Your application manifest should have the same name as, and be side by side to your executable.
|
||||||
|
"your_exe_name".exe.manifest
|
||||||
|
|
||||||
|
|
||||||
Example application manifest:
|
Example application manifest:
|
||||||
```
|
```
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче