├── .config
└── 1espt
│ └── PipelineAutobaseliningConfig.yml
├── .gitattributes
├── .github
└── workflows
│ └── stale.yml
├── .gitignore
├── .pipelines
├── AbiWinRT-Job.yml
├── Build-Job.yml
├── MidlRT-Job.yml
├── OneBranch.Official.yml
├── OneBranch.PullRequest.yml
├── SyncMirror-Pipeline.yml
└── Variables.yml
├── Directory.Packages.props
├── LICENSE
├── README.md
├── design_notes
├── XDN00 - Design Note Process.md
├── XDN01 - A Strategy for Language Interoperability.md
├── XDN02 - Engineering Guidelines.md
├── XDN03 - xlang Type System.md
├── XDN04 - xlang Metadata.md
├── XDN05 - xlang Binary Interface.md
├── XDN06 - xlang Platform Abstraction Layer.md
├── XDN07 - xlang Foundation Types.md
├── XDN10 - Platform Support for Activation Factories.md
├── XDN11 - Error handling.md
├── XDN11_origination_diagram.png
└── design note template.md
├── docs
├── security.md
├── winrt
│ └── WinRT SxS Components.md
└── xplatwinrt
│ ├── XSPEC01 - Type System Specification.md
│ ├── XSPEC02 - Metadata Representation.md
│ ├── XSPEC03 - Platform Abstraction Layer.md
│ └── XSPEC04 - Application Binary Interface.md
├── nuget.config
├── samples
├── meta_reader
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── pch.cpp
│ └── pch.h
├── python
│ └── winml_tutorial
│ │ ├── .gitignore
│ │ ├── complete_winml_tutorial.py
│ │ ├── readme.md
│ │ └── winml_content
│ │ ├── Labels.txt
│ │ ├── SqueezeNet.onnx
│ │ └── kitten_224.png
└── readme.md
└── src
├── CMakeLists.txt
├── CMakeSettings.json
├── Directory.Build.Props
├── UndockedRegFreeWinRT
├── Catch
│ └── catch.hpp
├── Directory.Build.props
├── EmbeddedManifestManagedTest
│ ├── EmbeddedManifestManagedTest.csproj
│ ├── EmbeddedManifestManagedTest.manifest
│ └── Program.cs
├── EmbeddedManifestTest
│ ├── EmbeddedManifestTest.exe.manifest
│ ├── EmbeddedManifestTest.vcxproj
│ ├── EmbeddedManifestTest.vcxproj.filters
│ ├── directory.build.props
│ ├── embedded_manifest_test.cpp
│ ├── main.cpp
│ ├── packages.config
│ ├── pch.cpp
│ └── pch.h
├── EmbeddedTestComponent
│ ├── Class.cpp
│ ├── Class.h
│ ├── Class.idl
│ ├── EmbeddedTestComponent.def
│ ├── EmbeddedTestComponent.manifest
│ ├── EmbeddedTestComponent.vcxproj
│ ├── EmbeddedTestComponent.vcxproj.filters
│ ├── PropertySheet.props
│ ├── Resource.rc
│ ├── packages.config
│ ├── pch.cpp
│ ├── pch.h
│ ├── readme.txt
│ └── resource.h
├── ManifestParserTest
│ ├── ManifestParserTest.cpp
│ ├── ManifestParserTest.vcxproj
│ ├── ManifestParserTest.vcxproj.filters
│ ├── basicParse.largeFile.manifest
│ ├── basicParse.negative.blankFileName.manifest
│ ├── basicParse.negative.blankName.manifest
│ ├── basicParse.negative.duplicateAcid.manifest
│ ├── basicParse.negative.invalidThreadingModel.manifest
│ ├── basicParse.negative.missingFileName.manifest
│ ├── basicParse.negative.missingName.manifest
│ ├── basicParse.negative.missingThreadingModel.manifest
│ ├── basicParse.positive.manifest
│ ├── main.cpp
│ ├── packages.config
│ ├── pch.h
│ └── winrtActivation.dll1.manifest
├── Nuget
│ ├── LICENSE
│ ├── Microsoft.Windows.UndockedRegFreeWinrt.nuspec
│ ├── Microsoft.Windows.UndockedRegFreeWinrt.targets
│ ├── SignConfig.xml
│ └── readme.txt
├── README.md
├── SignConfig.xml
├── TestComponent
│ ├── Class.cpp
│ ├── Class.h
│ ├── Class.idl
│ ├── PropertySheet.props
│ ├── TestComponent.def
│ ├── TestComponent.vcxproj
│ ├── TestComponent.vcxproj.filters
│ ├── packages.config
│ ├── pch.cpp
│ ├── pch.h
│ └── readme.txt
├── UndockedRegFreeWinRT.sln
├── UndockedRegFreeWinRT
│ ├── UndockedRegFreeWinRT.vcxproj
│ ├── UndockedRegFreeWinRT.vcxproj.filters
│ ├── catalog.cpp
│ ├── catalog.h
│ ├── cpp.hint
│ ├── dllmain.cpp
│ ├── extwinrt.h
│ ├── packages.config
│ ├── typeresolution.cpp
│ ├── typeresolution.h
│ └── winrtact.def
├── UndockedRegFreeWinRTManagedTest
│ ├── Program.cs
│ └── UndockedRegFreeWinRTManagedTest.csproj
├── UndockedRegFreeWinRTTest
│ ├── UndockedRegFreeWinRTTest.vcxproj
│ ├── UndockedRegFreeWinRTTest.vcxproj.filters
│ ├── directory.build.props
│ ├── main.cpp
│ ├── packages.config
│ ├── pch.cpp
│ ├── pch.h
│ ├── test_apartment_activation.cpp
│ └── test_files
│ │ └── UndockedRegFreeWinRTTest.exe.manifest
├── detours
│ ├── creatwth.cpp
│ ├── detours.cpp
│ ├── detours.h
│ ├── detours.vcxproj
│ ├── detours.vcxproj.filters
│ ├── detver.h
│ ├── disasm.cpp
│ ├── disolarm.cpp
│ ├── disolarm64.cpp
│ ├── disolia64.cpp
│ ├── disolx64.cpp
│ ├── disolx86.cpp
│ ├── image.cpp
│ ├── modules.cpp
│ └── uimports.cpp
└── mwinrtact
│ ├── mwinrtact.cs
│ └── mwinrtact.csproj
├── foundation
├── CMakeLists.txt
└── xlang_foundation.il
├── library
├── catch.hpp
├── cmd_reader.h
├── impl
│ ├── base.h
│ ├── cmd_reader_windows.h
│ ├── meta_reader
│ │ ├── cache.h
│ │ ├── column.h
│ │ ├── custom_attribute.h
│ │ ├── database.h
│ │ ├── enum.h
│ │ ├── enum_traits.h
│ │ ├── filter.h
│ │ ├── flags.h
│ │ ├── helpers.h
│ │ ├── index.h
│ │ ├── key.h
│ │ ├── pe.h
│ │ ├── schema.h
│ │ ├── signature.h
│ │ ├── table.h
│ │ ├── type_helpers.h
│ │ └── view.h
│ └── meta_writer
│ │ └── pe_writer.h
├── meta_reader.h
├── meta_writer.h
├── task_group.h
├── text_writer.h
└── xlang.meta.natvis
├── package
├── CMakeLists.txt
├── abi
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── Microsoft.Windows.AbiWinRT.nuspec
│ ├── Microsoft.Windows.AbiWinRT.props
│ ├── Microsoft.Windows.AbiWinRT.targets
│ ├── SignConfig.xml
│ └── readme.txt
├── midlrt
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── Microsoft.Windows.MidlRT.IdlGen.targets
│ ├── Microsoft.Windows.MidlRT.nuspec
│ ├── Microsoft.Windows.MidlRT.props
│ ├── Microsoft.Windows.MidlRT.targets
│ ├── SignConfig.xml
│ ├── readme.md
│ └── readme.txt
└── pywinrt
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── projection
│ ├── .gitignore
│ ├── AzurePipelinesTemplates
│ │ ├── job-build-projection.yml
│ │ ├── job-build-pywinrt.yml
│ │ ├── job-package-projection.yml
│ │ ├── job-sign-projection.yml
│ │ ├── steps-build-projection.yml
│ │ ├── steps-package-projection.yml
│ │ ├── steps-sign-projection.yml
│ │ └── task-vsdevcmd.yml
│ ├── CMakeLists.txt
│ ├── build.ps1
│ ├── generate.ps1
│ ├── package.ps1
│ ├── pipeline-internal.yml
│ ├── pipeline-public.yml
│ ├── readme.md
│ ├── setup.py
│ └── unity.ps1
│ └── tool
│ ├── CMakeLists.txt
│ ├── Microsoft.Windows.PyWinRT.nuspec
│ ├── readme.md
│ └── readme.txt
├── platform
├── CMakeLists.txt
├── activation_abi.cpp
├── cache_string.h
├── common_activation.cpp
├── common_memory.cpp
├── common_string_convert.cpp
├── error_abi.cpp
├── heap_string.h
├── helpers
│ ├── atomic_ref_count.h
│ ├── pal_error.h
│ └── pal_internal.h
├── opaque_string_wrapper.h
├── platform_activation.h
├── published
│ └── pal.h
├── string_abi.cpp
├── string_allocate.h
├── string_base.cpp
├── string_base.h
├── string_convert.h
├── string_reference.h
├── string_traits.h
├── win32_activation.cpp
├── win32_memory.cpp
├── win32_pal_internal.h
└── win32_string_convert.cpp
├── readme.md
├── scripts
├── genStringLiteralFiles.cmake
├── mdExts.js
├── scorch.cmake
├── ubuntu
│ ├── azure-pipelines.yml
│ ├── build.sh
│ └── configure.sh
└── windows
│ ├── azure-pipelines.yml
│ ├── build.cmd
│ └── vsdevcmd-build.cmd
├── test
├── CMakeLists.txt
├── abi_component
│ ├── CMakeLists.txt
│ ├── iwidget.h
│ ├── module.def
│ └── widget.cpp
├── cppx
│ ├── CMakeLists.txt
│ ├── IXlangObject.cpp
│ ├── collection_base.cpp
│ ├── error.cpp
│ ├── hstring.cpp
│ ├── main.cpp
│ ├── param_iterable.cpp
│ ├── param_map.cpp
│ ├── param_map_view.cpp
│ ├── param_vector.cpp
│ ├── param_vector_view.cpp
│ ├── pch.cpp
│ ├── pch.h
│ ├── produce_map.cpp
│ ├── produce_vector.cpp
│ ├── single_threaded_map.cpp
│ └── single_threaded_vector.cpp
├── library
│ ├── CMakeLists.txt
│ ├── main.cpp
│ ├── pch.cpp
│ ├── pch.h
│ └── text_writer.cpp
├── platform
│ ├── CMakeLists.txt
│ ├── activation.cpp
│ ├── error.cpp
│ ├── main.cpp
│ ├── memory.cpp
│ ├── pch.cpp
│ ├── pch.h
│ ├── string.cpp
│ ├── string_helpers.h
│ └── winrt_helpers.h
└── python
│ ├── CMakeLists.txt
│ ├── complete_winml_tutorial.py
│ ├── loader_native.py
│ ├── ntestdirectx.py
│ ├── ntestgeoloc.py
│ ├── ntestnumerics.py
│ ├── ntesturi.py
│ ├── testcollections.py
│ ├── testdirectx.py
│ ├── testfromfunction.py
│ ├── testgeoloc.py
│ ├── testjson.py
│ ├── testnumerics.py
│ ├── testpropertyvalue.py
│ └── testuri.py
└── tool
├── CMakeLists.txt
├── Directory.Build.Targets
├── abi
├── CMakeLists.txt
├── SignConfig.xml
├── abi.sln
├── abi.vcxproj
├── abi.vcxproj.filters
├── abi_writer.cpp
├── abi_writer.h
├── build.yaml
├── code_writers.h
├── common.h
├── main.cpp
├── metadata_cache.cpp
├── metadata_cache.h
├── namespace_iterator.h
├── pch.cpp
├── pch.h
├── readme.md
├── sha1.h
├── strings
│ ├── constexpr_definitions.h
│ ├── constexpr_end_definitions.h
│ ├── deprecated_header_end.h
│ ├── deprecated_header_start.h
│ ├── enum_class.h
│ ├── file_header.h
│ ├── include_guard_end.h
│ ├── include_guard_start.h
│ ├── ns_prefix_always.h
│ ├── ns_prefix_definitions.h
│ ├── ns_prefix_never.h
│ ├── ns_prefix_optional.h
│ ├── optional_ns_prefix_definitions.h
│ └── optional_ns_prefix_end_definitions.h
├── type_banners.h
├── type_names.h
├── types.cpp
├── types.h
└── versioning.h
├── cppxlang
├── CMakeLists.txt
├── code_writers.h
├── component_writers.h
├── file_writers.h
├── helpers.h
├── main.cpp
├── pch.cpp
├── pch.h
├── settings.h
├── strings
│ ├── base_abi.h
│ ├── base_activation.h
│ ├── base_array.h
│ ├── base_async.h
│ ├── base_chrono.h
│ ├── base_collections.h
│ ├── base_collections_base.h
│ ├── base_collections_input_iterable.h
│ ├── base_collections_input_map.h
│ ├── base_collections_input_map_view.h
│ ├── base_collections_input_vector.h
│ ├── base_collections_input_vector_view.h
│ ├── base_collections_map.h
│ ├── base_collections_vector.h
│ ├── base_com_ptr.h
│ ├── base_composable.h
│ ├── base_coroutine.h
│ ├── base_coroutine_action.h
│ ├── base_coroutine_fire_and_forget.h
│ ├── base_coroutine_operation.h
│ ├── base_coroutine_resume.h
│ ├── base_delegate.h
│ ├── base_dependencies.h
│ ├── base_error.h
│ ├── base_events.h
│ ├── base_extern.h
│ ├── base_handle.h
│ ├── base_identity.h
│ ├── base_implements.h
│ ├── base_macros.h
│ ├── base_meta.h
│ ├── base_natvis.h
│ ├── base_reflect.h
│ ├── base_std_hash.h
│ ├── base_string.h
│ ├── base_string_input.h
│ ├── base_string_operators.h
│ ├── base_types.h
│ ├── base_version.h
│ ├── base_weak_ref.h
│ └── base_windows.h
├── test_base
│ ├── CMakeLists.txt
│ └── main.cpp
└── type_writers.h
└── python
├── CMakeLists.txt
├── code_writers.h
├── file_writers.h
├── helpers.h
├── main.cpp
├── pch.cpp
├── pch.h
├── settings.h
├── strings
├── custom_struct_convert.cpp
├── enter_function.cpp
├── module_methods.cpp
├── ns_module_def.cpp
├── package_init.py
├── pybase.h
└── setup.py
└── type_writers.h
/.config/1espt/PipelineAutobaseliningConfig.yml:
--------------------------------------------------------------------------------
1 | ## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.
2 |
3 | pipelines:
4 | 108957:
5 | retail:
6 | source:
7 | credscan:
8 | lastModifiedDate: 2023-10-31
9 | eslint:
10 | lastModifiedDate: 2023-10-31
11 | psscriptanalyzer:
12 | lastModifiedDate: 2023-10-31
13 | armory:
14 | lastModifiedDate: 2023-10-31
15 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | * text eol=lf
3 | *.png -text
4 | *.onnx -text
5 | *.winmd -text
6 |
--------------------------------------------------------------------------------
/.github/workflows/stale.yml:
--------------------------------------------------------------------------------
1 | name: Mark stale issues and pull requests
2 |
3 | on:
4 | schedule:
5 | - cron: '0 0 * * *'
6 |
7 | jobs:
8 | stale:
9 |
10 | runs-on: ubuntu-latest
11 | permissions:
12 | issues: write
13 | pull-requests: write
14 |
15 | steps:
16 | - uses: actions/stale@v7
17 | with:
18 | repo-token: ${{ secrets.GITHUB_TOKEN }}
19 | days-before-stale: 10
20 | days-before-close: 5
21 | stale-issue-message: 'This issue is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
22 | stale-pr-message: 'This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
23 | stale-issue-label: 'no-issue-activity'
24 | stale-pr-label: 'no-pr-activity'
25 |
--------------------------------------------------------------------------------
/.pipelines/AbiWinRT-Job.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | - name: OfficialBuild
3 | type: boolean
4 | default: false
5 |
6 | jobs:
7 | - job: Build_External_Packages
8 | displayName: Build External Packages (NuGet)
9 | cancelTimeoutInMinutes: 1
10 | dependsOn: Build_ABI_Tool
11 | pool:
12 | type: windows
13 |
14 | variables:
15 | ob_outputDirectory: '$(Build.SourcesDirectory)\out'
16 | ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }}
17 | PackageVersion: $(Build.BuildNumber)
18 |
19 | steps:
20 |
21 | - task: NuGetToolInstaller@1
22 | displayName: Use NuGet 6.7
23 | continueOnError: True
24 | inputs:
25 | versionSpec: 6.7
26 |
27 | - task: DownloadPipelineArtifact@2
28 | displayName: Download x86 Artifacts
29 | inputs:
30 | artifactName: drop_stage_Build_ABI_Toolrelease_x86
31 | targetPath: $(Build.SourcesDirectory)\x86
32 |
33 | - task: CmdLine@2
34 | displayName: Touch Tools
35 | inputs:
36 | script: >
37 |
38 | rem Signing service stamps binary with a future (GMT) timestamp, breaking build dependencies
39 |
40 | copy /b $(Build.SourcesDirectory)\x86\abi\abi.exe+,, abi.exe
41 | workingDirectory: $(Build.ArtifactStagingDirectory)
42 | failOnStderr: true
43 |
44 | - task: NuGetCommand@2
45 | displayName: Build NuGet
46 | inputs:
47 | command: pack
48 | searchPatternPack: src/package/abi/Microsoft.Windows.AbiWinRT.nuspec
49 | versioningScheme: byBuildNumber
50 | buildProperties: abiwinrt_exe=$(Build.ArtifactStagingDirectory)\abi.exe
51 | packDestination: $(ob_outputDirectory)\packages
52 |
53 | - task: onebranch.pipeline.signing@1
54 | displayName: '🔒 Onebranch Signing for AbiWinRT nuget package'
55 | condition: eq(${{ parameters.OfficialBuild }}, 'true')
56 | inputs:
57 | command: sign
58 | signing_profile: external_distribution
59 | files_to_sign: 'Microsoft.Windows.AbiWinRT.*.nupkg'
60 | search_root: $(ob_outputDirectory)\packages
61 |
--------------------------------------------------------------------------------
/.pipelines/Build-Job.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | - name: "BuildConfiguration"
3 | type: string
4 | default: "release"
5 | - name: "BuildPlatform"
6 | type: string
7 | default: "x86"
8 | - name: OfficialBuild
9 | type: boolean
10 | default: false
11 |
12 | jobs:
13 | - job: Build_ABI_Tool
14 | displayName: Build Binaries
15 | pool:
16 | type: windows
17 |
18 | variables:
19 | ob_outputDirectory: '$(Build.SourcesDirectory)\out'
20 | ob_artifactSuffix: ${{ parameters.BuildConfiguration }}_${{ parameters.BuildPlatform }}
21 | StagingFolder: $(ob_outputDirectory)
22 |
23 | ob_sdl_prefast_enabled: true
24 | ob_sdl_prefast_runDuring: 'Build'
25 | ob_sdl_checkCompliantCompilerWarnings: true
26 |
27 | steps:
28 |
29 | - task: NuGetToolInstaller@1
30 | displayName: Use NuGet 6.7
31 | continueOnError: True
32 | inputs:
33 | versionSpec: 6.7
34 |
35 | - task: VSBuild@1
36 | displayName: Build Tools
37 | inputs:
38 | solution: '$(Build.SourcesDirectory)\src\tool\abi\abi.sln'
39 | msbuildArgs: >-
40 | /p:XlangBuildVersion="$(Build.BuildNumber)"
41 | /p:OutDir=$(ob_outputDirectory)\abi\
42 | /binaryLogger:$(ob_outputDirectory)\abi\abi.binlog
43 | platform: ${{ parameters.BuildPlatform }}
44 | configuration: ${{ parameters.BuildConfiguration }}
45 | clean: true
46 |
47 | - task: onebranch.pipeline.signing@1
48 | displayName: '🔒 Onebranch Signing for abi.exe'
49 | condition: eq(${{ parameters.OfficialBuild }}, 'true')
50 | inputs:
51 | command: sign
52 | signing_profile: external_distribution
53 | files_to_sign: '**/*.dll;**/*.exe'
54 | search_root: $(ob_outputDirectory)\abi
55 |
--------------------------------------------------------------------------------
/.pipelines/MidlRT-Job.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | - name: OfficialBuild
3 | type: boolean
4 | default: false
5 |
6 | jobs:
7 | - job: Build_MidlRT_Nuget
8 | displayName: Build MidlRT Package (Nuget)
9 | pool:
10 | type: windows
11 |
12 | variables:
13 | ob_outputDirectory: '$(Build.SourcesDirectory)\out'
14 | ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }}
15 | PackageVersion: $(Build.BuildNumber)
16 |
17 | steps:
18 |
19 | - task: NuGetToolInstaller@1
20 | displayName: Use NuGet 6.7
21 | continueOnError: True
22 | inputs:
23 | versionSpec: 6.7
24 |
25 | - task: NuGetCommand@2
26 | displayName: Build NuGet
27 | inputs:
28 | command: pack
29 | searchPatternPack: src/package/midlrt/Microsoft.Windows.MidlRT.nuspec
30 | versioningScheme: byBuildNumber
31 | packDestination: $(ob_outputDirectory)\packages
32 |
33 | - task: onebranch.pipeline.signing@1
34 | displayName: '🔒 Onebranch Signing for MidlRT nuget package'
35 | condition: eq(${{ parameters.OfficialBuild }}, 'true')
36 | inputs:
37 | command: sign
38 | signing_profile: external_distribution
39 | files_to_sign: 'Microsoft.Windows.MidlRT.*.nupkg'
40 | search_root: $(ob_outputDirectory)\packages
41 |
--------------------------------------------------------------------------------
/.pipelines/OneBranch.PullRequest.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | - name: "BuildConfiguration"
3 | type: string
4 | default: "release"
5 | - name: "BuildPlatform"
6 | type: string
7 | default: "x86"
8 | - name: 'debug'
9 | displayName: 'Enable debug output'
10 | type: boolean
11 | default: false
12 |
13 | variables:
14 | - template: Variables.yml
15 | parameters:
16 | debug: ${{ parameters.debug }}
17 |
18 | trigger: none
19 |
20 | name: $(MajorVersion).$(MinorVersion).$(date:yyMMdd)$(rev:.r)-PR
21 |
22 | resources:
23 | repositories:
24 | - repository: templates
25 | type: git
26 | name: OneBranch.Pipelines/GovernedTemplates
27 | ref: refs/heads/main
28 |
29 | extends:
30 | template: v2/Microsoft.NonOfficial.yml@templates
31 | parameters:
32 | platform:
33 | name: 'windows_undocked'
34 | product: 'build_tools'
35 |
36 | globalSdl:
37 | isNativeCode: true
38 | tsa:
39 | enabled: false
40 | useDynamicRouting: true
41 | sbom:
42 | enabled: true
43 |
44 | stages:
45 | - stage: stage
46 | pool:
47 | type: windows
48 |
49 | jobs:
50 |
51 | - template: .pipelines/Build-Job.yml@self
52 | parameters:
53 | BuildConfiguration: ${{ parameters.BuildConfiguration }}
54 | BuildPlatform: ${{ parameters.BuildPlatform }}
55 | OfficialBuild: false
56 |
57 | - ${{ if and(eq(parameters.BuildPlatform, 'x86'), eq(parameters.BuildConfiguration, 'release')) }}:
58 | - template: .pipelines/AbiWinRT-Job.yml@self
59 | parameters:
60 | OfficialBuild: false
61 |
62 | - template: .pipelines/MidlRT-Job.yml@self
63 | parameters:
64 | OfficialBuild: false
--------------------------------------------------------------------------------
/.pipelines/SyncMirror-Pipeline.yml:
--------------------------------------------------------------------------------
1 | # Sync branches in a mirror repository to a base repo by running this pipeline
2 | # from the mirror repo, and supplying the base repo as a parameter
3 | name: $(BuildDefinitionName)_$(date:yyMMdd)$(rev:.r)
4 |
5 | parameters:
6 | - name: "SourceToTargetBranches"
7 | type: object
8 | default:
9 | master: master
10 | - name: "SourceRepository"
11 | type: string
12 | default: "https://github.com/microsoft/xlang.git"
13 |
14 | resources:
15 | repositories:
16 | - repository: 1ESPipelineTemplates
17 | type: git
18 | name: 1ESPipelineTemplates/1ESPipelineTemplates
19 | ref: refs/tags/release
20 | extends:
21 | template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
22 | parameters:
23 | pool:
24 | name: Azure-Pipelines-1ESPT-ExDShared
25 | image: windows-2022
26 | os: windows
27 | customBuildTags:
28 | - ES365AIMigrationTooling
29 | stages:
30 | - stage: stage
31 | jobs:
32 | - job: SyncMirror
33 | strategy:
34 | matrix:
35 | ${{ each branches in parameters.SourceToTargetBranches }}:
36 | ${{ branches.key }}:
37 | SourceBranch: ${{ branches.key }}
38 | TargetBranch: ${{ branches.value }}
39 | dependsOn: []
40 | steps:
41 | - checkout: self
42 | persistCredentials: true
43 |
44 | - task: PowerShell@2
45 | inputs:
46 | targetType: 'inline'
47 | script: |
48 | Write-Host "SourceBranch " + "$(SourceBranch)"
49 | Write-Host "TargetBranch " + "$(TargetBranch)"
50 |
51 | $repo = "${{ parameters.SourceRepository }}"
52 | git remote add sourcerepo $repo
53 | git remote
54 |
55 | $target = "$(TargetBranch)"
56 | git fetch origin $target
57 | git checkout $target
58 | git pull origin $target
59 |
60 | $source = "$(SourceBranch)"
61 | git fetch sourcerepo $source
62 | git pull sourcerepo $source
63 |
64 | - task: CmdLine@2
65 | inputs:
66 | script: |
67 | git push
68 |
69 |
--------------------------------------------------------------------------------
/.pipelines/Variables.yml:
--------------------------------------------------------------------------------
1 | variables:
2 | MajorVersion: "2"
3 | MinorVersion: "0"
4 | ENABLE_PRS_DELAYSIGN: 1
5 | # Docker image which is used to build the project https://aka.ms/obpipelines/containers
6 | WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2019/vse2022:latest'
7 | system.debug: ${{ parameters.debug }}
--------------------------------------------------------------------------------
/Directory.Packages.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/design_notes/XDN02 - Engineering Guidelines.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: XDN02
3 | title: Engineering Guidelines
4 | author: benkuhn@microsoft.com
5 | status: draft
6 | ---
7 |
8 | # Title: XLDN02 - Engineering Guidelines
9 |
10 | - Ben Kuhn (benkuhn@microsoft.com)
11 | - Status: Draft
12 |
13 | ## Abstract
14 |
15 | The xlang Project involves many components written in a variety of programming languages. This document describes coding guidelines for each language.
16 |
17 | ## Coding Guidelines
18 |
19 | This project adopts industry standard guidelines where one exists. As new language support is added to the project, this list will be expanded to include applicable standards.
20 |
21 | The project references these as guidelines, not laws. Thoughtful deviation is allowed if it aids readability of the specific code in question or is necessary for a technical reason. However, guidelines should not be ignored because of a disagreement with the guideline itself.
22 |
23 | Due to the nature of language interoperability, types expressed using the xlang type system will adhere to naming guidelines in some languages and deviate from others. Naming conventions of the xlang type system take precedence over language-specific guidelines where applicable.
24 |
25 | ### References by language
26 |
27 | - C++ code follows the [C++ core guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md)
28 |
29 | - C# code follows the [C# coding conventions](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions)
30 |
31 | - .NET types adhere to the [.NET Framework Design Guidelines](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions).
32 |
33 | - Python code is [pythonic](https://docs.python-guide.org/writing/style/).
34 |
--------------------------------------------------------------------------------
/design_notes/XDN04 - xlang Metadata.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: XDN04
3 | title: xlang Metadata
4 | author: hpierson@microsoft.com
5 | status: draft
6 | ---
7 |
8 | # Title: XDN04 - xlang Metadata
9 |
10 | - Author: Harry Pierson (hpierson@microsoft.com)
11 | - Status: draft
12 |
13 | ## Abstract
14 |
15 | This design note describes the machine-readable format used to encode details about
16 | [xlang types](XDN03%20-%20xlang%20Type%20System.md) implemented by xlang components. The metadata
17 | is used to generate language projections for xlang components automatically using compile time
18 | and/or run time tools.
19 |
--------------------------------------------------------------------------------
/design_notes/XDN06 - xlang Platform Abstraction Layer.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: XDN06
3 | title: xlang Platform Abstraction Layer
4 | author: hpierson@microsoft.com
5 | status: draft
6 | ---
7 |
8 | # Title: XDN06 - xlang Platform Abstraction Layer
9 |
10 | - Author: Harry Pierson (hpierson@microsoft.com)
11 | - Status: draft
12 |
13 | ## Abstract
14 |
15 | This design note describes xlang's [platform abstraction layer](https://en.wikipedia.org/wiki/Abstraction_layer)
16 | (or PAL). The PAL contains the core functionality needed by xlang components and language
17 | projections, regardless of the underlying platform. Examples of this functionality include
18 | activating instances of [xlang types](XDN03%20-%20xlang%20Type%20System.md), propagating errors
19 | across binary or language boundaries and managing memory across binary modules.
20 |
21 | ## Activation
22 |
23 | ### Factory Caching
24 |
25 | ## String Manipulation
26 |
27 | ## Memory Management
28 |
29 | ## Error Origination and Propagation
30 |
31 | ## Threading
32 |
33 | ## Numerics
--------------------------------------------------------------------------------
/design_notes/XDN07 - xlang Foundation Types.md:
--------------------------------------------------------------------------------
1 | ---
2 | id: XDN07
3 | title: xlang Foundation Types
4 | author: hpierson@microsoft.com
5 | status: draft
6 | ---
7 |
8 | # Title: XDN07 - xlang Foundation Types
9 |
10 | - Author: Harry Pierson (hpierson@microsoft.com)
11 | - Status: draft
12 |
13 | ## Abstract
14 |
15 | This design note describes xlang's foundational types. These types are provided as part of xlang
16 | and are designed to standardize the types used in common language interoperability scenarios like
17 | asynchronous processing and collections.
18 |
19 | ## DateTime and TimeStamp
20 |
21 | ## Asynchronous Operations
22 |
23 | ## Collections
24 |
25 | ## TypedEventHandler
26 |
27 | ## Observables
28 |
29 | ## URI
30 |
--------------------------------------------------------------------------------
/design_notes/XDN11_origination_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/xlang/5b209157bf0c2db1ace71a0cf261470536102cf5/design_notes/XDN11_origination_diagram.png
--------------------------------------------------------------------------------
/docs/winrt/WinRT SxS Components.md:
--------------------------------------------------------------------------------
1 | ## Placeholder
--------------------------------------------------------------------------------
/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/meta_reader/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.9)
2 |
3 | if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13")
4 | cmake_policy(SET CMP0076 NEW)
5 | endif()
6 |
7 | project(meta_reader)
8 |
9 | set(XLANG_LIBRARY_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../src/library")
10 |
11 | set(CMAKE_CXX_STANDARD 17)
12 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
13 |
14 | add_executable(meta_reader "")
15 | target_sources(meta_reader PUBLIC main.cpp pch.cpp)
16 | target_include_directories(meta_reader PUBLIC ${XLANG_LIBRARY_PATH})
17 |
18 | function(ADD_OBJECT_DEPENDS file dependency)
19 | get_source_file_property(cur_obj_depends ${file} OBJECT_DEPENDS)
20 | if (${cur_obj_depends} STREQUAL "NOTFOUND")
21 | set(new_obj_depends "${pch_output_file_name}")
22 | else()
23 | set(new_obj_depends "${cur_obj_depends};${dependency}")
24 | endif()
25 | set_source_files_properties(${file} PROPERTIES OBJECT_DEPENDS ${new_obj_depends})
26 | endfunction(ADD_OBJECT_DEPENDS)
27 |
28 | function(TARGET_CONFIG_MSVC_PCH target pch_cpp pch_header)
29 | get_target_property(target_name ${target} NAME)
30 | set(pch_output_file_name "${target_name}.pch")
31 | set(pch_output_file "\"${CMAKE_CURRENT_BINARY_DIR}/${pch_output_file_name}\"")
32 |
33 | get_target_property(sources ${target} SOURCES)
34 | foreach(file ${sources})
35 | if (${file} STREQUAL ${pch_cpp})
36 | set_source_files_properties(${file}
37 | PROPERTIES
38 | COMPILE_FLAGS " /Yc${pch_header} /Fp${pch_output_file}"
39 | OBJECT_OUTPUTS ${pch_output_file_name})
40 | else()
41 | set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS " /Yu${pch_header} /Fp${pch_output_file}")
42 | ADD_OBJECT_DEPENDS(${file} ${pch_output_file_name})
43 | endif()
44 | endforeach()
45 |
46 | set_target_properties(${target} PROPERTIES PCH_OUTPUT_FILE ${pch_output_file})
47 | set_property(GLOBAL APPEND PROPERTY PCH_OUTPUT_FILES ${pch_output_file})
48 | endfunction(TARGET_CONFIG_MSVC_PCH)
49 |
50 | if (WIN32)
51 | add_definitions(-DNOMINMAX)
52 | endif()
53 |
54 | if (MSVC)
55 | TARGET_CONFIG_MSVC_PCH(meta_reader pch.cpp pch.h)
56 | target_link_libraries(meta_reader)
57 | else()
58 | target_link_libraries(meta_reader c++ c++abi c++experimental)
59 | target_link_libraries(meta_reader -lpthread)
60 | endif()
61 |
--------------------------------------------------------------------------------
/samples/meta_reader/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/samples/meta_reader/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #include "cmd_reader.h"
6 | #include "meta_reader.h"
7 | #include "task_group.h"
8 | #include "text_writer.h"
9 |
--------------------------------------------------------------------------------
/samples/python/winml_tutorial/.gitignore:
--------------------------------------------------------------------------------
1 | /pywinrt_output/build/
2 | /pywinrt_output/vc140.pdb
3 | /pywinrt_output/_pyrt.*.pyd
4 | /__pycache__/
5 |
--------------------------------------------------------------------------------
/samples/python/winml_tutorial/winml_content/SqueezeNet.onnx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/xlang/5b209157bf0c2db1ace71a0cf261470536102cf5/samples/python/winml_tutorial/winml_content/SqueezeNet.onnx
--------------------------------------------------------------------------------
/samples/python/winml_tutorial/winml_content/kitten_224.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoft/xlang/5b209157bf0c2db1ace71a0cf261470536102cf5/samples/python/winml_tutorial/winml_content/kitten_224.png
--------------------------------------------------------------------------------
/samples/readme.md:
--------------------------------------------------------------------------------
1 | # Samples
2 |
3 | ## Folder Structure
4 |
5 | * **/meta_reader** sample metadata reader that generates [MIDL 3](http://docs.microsoft.com/en-us/uwp/midl-3/) files from ECMA-335 metadata.
6 | * **/python/winml_tutorial** a port of the [WinML C++/WinRT tutorial](https://docs.microsoft.com/en-us/windows/ai/get-started-desktop)
7 | to Python
--------------------------------------------------------------------------------
/src/CMakeSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "x86-Debug",
5 | "generator": "Ninja",
6 | "configurationType": "Debug",
7 | "inheritEnvironments": [
8 | "msvc_x86"
9 | ],
10 | "buildRoot": "${workspaceRoot}\\_build\\Windows\\x86\\Debug",
11 | "installRoot": "${workspaceRoot}\\_build\\Windows\\x86\\Debug\\Install",
12 | "cmakeCommandArgs": "",
13 | "buildCommandArgs": "-v",
14 | "ctestCommandArgs": ""
15 | },
16 | {
17 | "name": "x86-Release",
18 | "generator": "Ninja",
19 | "configurationType": "RelWithDebInfo",
20 | "inheritEnvironments": [
21 | "msvc_x86"
22 | ],
23 | "buildRoot": "${workspaceRoot}\\_build\\Windows\\x86\\Release",
24 | "installRoot": "${workspaceRoot}\\_build\\Windows\\x86\\Release\\Install",
25 | "cmakeCommandArgs": "",
26 | "buildCommandArgs": "-v",
27 | "ctestCommandArgs": ""
28 | },
29 | {
30 | "name": "x64-Debug",
31 | "generator": "Ninja",
32 | "configurationType": "Debug",
33 | "inheritEnvironments": [
34 | "msvc_x64_x64"
35 | ],
36 | "buildRoot": "${workspaceRoot}\\_build\\Windows\\x64\\Debug",
37 | "installRoot": "${workspaceRoot}\\_build\\Windows\\x64\\Debug\\Install",
38 | "cmakeCommandArgs": "",
39 | "buildCommandArgs": "-v",
40 | "ctestCommandArgs": ""
41 | },
42 | {
43 | "name": "x64-Release",
44 | "generator": "Ninja",
45 | "configurationType": "RelWithDebInfo",
46 | "inheritEnvironments": [
47 | "msvc_x64_x64"
48 | ],
49 | "buildRoot": "${workspaceRoot}\\_build\\Windows\\x64\\Release",
50 | "installRoot": "${workspaceRoot}\\_build\\Windows\\x64\\Release\\Install",
51 | "cmakeCommandArgs": "",
52 | "buildCommandArgs": "-v",
53 | "ctestCommandArgs": ""
54 | }
55 | ]
56 | }
--------------------------------------------------------------------------------
/src/Directory.Build.Props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | v143
6 | 10.0
7 |
8 |
9 |
10 | Spectre
11 |
12 |
13 |
14 | 0.0.0
15 |
16 |
17 |
18 |
19 | Level4
20 | true
21 | true
22 | stdcpp17
23 | NOMINMAX;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)
24 | ABIWINRT_VERSION_STRING="$(XlangBuildVersion)";%(PreprocessorDefinitions)
25 |
26 |
27 |
28 |
29 |
30 | MultiThreadedDebug
31 |
32 |
33 |
34 |
35 |
36 | Guard
37 | MultiThreaded
38 |
39 |
40 | true
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | 1.0.0.0
4 | $(Platform)
5 | x86
6 | $([System.IO.Path]::GetFullPath('$(SolutionDir)_build\$(BuildPlatform)\$(Configuration)\'))
7 | $(BuildOutDir)
8 | $([System.IO.Path]::GetFullPath('$(SolutionDir)_build\x86\$(Configuration)\'))
9 | $(CsWinRTDir)cswinrt.exe
10 | $(BuildOutDir)
11 | $(OutDir)$(ProjectName)\
12 | v142
13 | v143
14 |
15 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestManagedTest/EmbeddedManifestManagedTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 | x64;x86
7 |
8 |
9 | EmbeddedManifestManagedTest.manifest
10 |
11 |
12 |
13 | true
14 |
15 |
16 |
17 | true
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | ..\_build\x86\Debug\TestComponent.winmd
34 | true
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestManagedTest/EmbeddedManifestManagedTest.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
12 |
16 |
20 |
21 |
22 |
23 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/EmbeddedManifestTest.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
12 |
16 |
20 |
21 |
22 |
23 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/EmbeddedManifestTest.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 | Source Files
26 |
27 |
28 |
29 |
30 | Header Files
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/directory.build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | high
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/main.cpp:
--------------------------------------------------------------------------------
1 | #define CATCH_CONFIG_MAIN
2 | #include "..\Catch\catch.hpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedManifestTest/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "..\Catch\catch.hpp"
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/Class.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "Class.h"
3 | #include "ClassBoth.g.cpp"
4 | #include "ClassSta.g.cpp"
5 | #include "ClassMta.g.cpp"
6 |
7 | namespace winrt::EmbeddedTestComponent::implementation
8 | {
9 | int32_t ClassBoth::Apartment()
10 | {
11 | APTTYPE aptType;
12 | APTTYPEQUALIFIER aptQualifier;
13 | check_hresult(CoGetApartmentType(&aptType, &aptQualifier));
14 | return aptType;
15 | }
16 |
17 | void ClassBoth::Apartment(int32_t /* value */)
18 | {
19 | throw hresult_not_implemented();
20 | }
21 |
22 | int32_t ClassSta::Apartment()
23 | {
24 | APTTYPE aptType;
25 | APTTYPEQUALIFIER aptQualifier;
26 | check_hresult(CoGetApartmentType(&aptType, &aptQualifier));
27 | return aptType;
28 | }
29 |
30 | void ClassSta::Apartment(int32_t /* value */)
31 | {
32 | throw hresult_not_implemented();
33 | }
34 |
35 | int32_t ClassMta::Apartment()
36 | {
37 | APTTYPE aptType;
38 | APTTYPEQUALIFIER aptQualifier;
39 | check_hresult(CoGetApartmentType(&aptType, &aptQualifier));
40 | return aptType;
41 | }
42 |
43 | void ClassMta::Apartment(int32_t /* value */)
44 | {
45 | throw hresult_not_implemented();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/Class.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ClassBoth.g.h"
4 | #include "ClassSta.g.h"
5 | #include "ClassMta.g.h"
6 |
7 | namespace winrt::EmbeddedTestComponent::implementation
8 | {
9 | struct ClassBoth : ClassBothT
10 | {
11 | ClassBoth() = default;
12 |
13 | int32_t Apartment();
14 | void Apartment(int32_t value);
15 | };
16 |
17 | struct ClassSta : ClassStaT
18 | {
19 | ClassSta() = default;
20 |
21 | int32_t Apartment();
22 | void Apartment(int32_t value);
23 | };
24 |
25 | struct ClassMta : ClassMtaT
26 | {
27 | ClassMta() = default;
28 |
29 | int32_t Apartment();
30 | void Apartment(int32_t value);
31 | };
32 | }
33 |
34 | namespace winrt::EmbeddedTestComponent::factory_implementation
35 | {
36 | struct ClassBoth : ClassBothT
37 | {
38 | };
39 |
40 | struct ClassSta : ClassStaT
41 | {
42 | };
43 |
44 | struct ClassMta : ClassMtaT
45 | {
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/Class.idl:
--------------------------------------------------------------------------------
1 | namespace EmbeddedTestComponent
2 | {
3 | [default_interface]
4 | runtimeclass ClassBoth
5 | {
6 | ClassBoth();
7 | Int32 Apartment;
8 | }
9 |
10 | [default_interface]
11 | runtimeclass ClassSta
12 | {
13 | ClassSta();
14 | Int32 Apartment;
15 | }
16 |
17 | [default_interface]
18 | runtimeclass ClassMta
19 | {
20 | ClassMta();
21 | Int32 Apartment;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/EmbeddedTestComponent.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
3 | DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/EmbeddedTestComponent.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
13 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/EmbeddedTestComponent.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | accd3aa8-1ba0-4223-9bbe-0c431709210b
6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms
7 |
8 |
9 | {926ab91d-31b4-48c3-b9a4-e681349f27f0}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/PropertySheet.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/Resource.rc:
--------------------------------------------------------------------------------
1 | #define MANIFEST_RESOURCE_ID 2
2 | #define RT_MANIFEST 24
3 | MANIFEST_RESOURCE_ID RT_MANIFEST "EmbeddedTestComponent.manifest"
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/readme.txt:
--------------------------------------------------------------------------------
1 | ========================================================================
2 | C++/WinRT EmbeddedTestComponent Project Overview
3 | ========================================================================
4 |
5 | This project demonstrates how to get started authoring Windows Runtime
6 | classes directly with standard C++, using the C++/WinRT SDK component
7 | to generate implementation headers from interface (IDL) files. The
8 | generated Windows Runtime component binary and WinMD files should then
9 | be bundled with the Universal Windows Platform (UWP) app consuming them.
10 |
11 | Steps:
12 | 1. Create an interface (IDL) file to define your Windows Runtime class,
13 | its default interface, and any other interfaces it implements.
14 | 2. Build the project once to generate module.g.cpp, module.h.cpp, and
15 | implementation templates under the "Generated Files" folder, as
16 | well as skeleton class definitions under "Generated Files\sources".
17 | 3. Use the skeleton class definitions for reference to implement your
18 | Windows Runtime classes.
19 |
20 | ========================================================================
21 | Learn more about C++/WinRT here:
22 | http://aka.ms/cppwinrt/
23 | ========================================================================
24 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/EmbeddedTestComponent/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Resource.rc
4 |
5 | // Next default values for new objects
6 | //
7 | #ifdef APSTUDIO_INVOKED
8 | #ifndef APSTUDIO_READONLY_SYMBOLS
9 | #define _APS_NEXT_RESOURCE_VALUE 101
10 | #define _APS_NEXT_COMMAND_VALUE 40001
11 | #define _APS_NEXT_CONTROL_VALUE 1001
12 | #define _APS_NEXT_SYMED_VALUE 101
13 | #endif
14 | #endif
15 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/ManifestParserTest.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | Header Files
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.blankFileName.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.blankName.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.duplicateAcid.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
14 |
15 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.invalidThreadingModel.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.missingFileName.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.missingName.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.negative.missingThreadingModel.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/basicParse.positive.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
13 |
17 |
21 |
25 |
26 |
27 |
31 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/main.cpp:
--------------------------------------------------------------------------------
1 | #define CATCH_CONFIG_MAIN
2 | #include "..\Catch\catch.hpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "..\Catch\catch.hpp"
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/ManifestParserTest/winrtActivation.dll1.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
14 |
18 |
22 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/Nuget/LICENSE:
--------------------------------------------------------------------------------
1 | C++ for the Windows Runtime (C++/WinRT)
2 |
3 | Copyright (c) Microsoft Corporation
4 | All rights reserved.
5 |
6 | MIT License
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | SOFTWARE.
25 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/Nuget/Microsoft.Windows.UndockedRegFreeWinrt.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft.Windows.UndockedRegFreeWinrt
5 | 1.0.0.0
6 | Regfree WinRT Build Support
7 | Microsoft
8 | Microsoft
9 | false
10 | Regfree WinRT enables using WinRT types from unpackaged applications, a feature that is available starting on Windows version 1903 and above. This nuget package backfills this functionality to previous Windows versions down to RS2.
11 |
12 | regfree WinRT
13 | © Microsoft Corporation. All rights reserved.
14 | LICENSE
15 | https://github.com/Microsoft/xlang
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/Nuget/SignConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/SignConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/Class.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "Class.h"
3 | #include "ClassBoth.g.cpp"
4 | #include "ClassSta.g.cpp"
5 | #include "ClassMta.g.cpp"
6 |
7 | namespace winrt::TestComponent::implementation
8 | {
9 | int32_t ClassBoth::Apartment()
10 | {
11 | APTTYPE aptType;
12 | APTTYPEQUALIFIER aptQualifier;
13 | check_hresult(CoGetApartmentType(&aptType, &aptQualifier));
14 | return aptType;
15 | }
16 |
17 | void ClassBoth::Apartment(int32_t /* value */)
18 | {
19 | throw hresult_not_implemented();
20 | }
21 |
22 | int32_t ClassSta::Apartment()
23 | {
24 | APTTYPE aptType;
25 | APTTYPEQUALIFIER aptQualifier;
26 | check_hresult(CoGetApartmentType(&aptType, &aptQualifier));
27 | return aptType;
28 | }
29 |
30 | void ClassSta::Apartment(int32_t /* value */)
31 | {
32 | throw hresult_not_implemented();
33 | }
34 |
35 | int32_t ClassMta::Apartment()
36 | {
37 | APTTYPE aptType;
38 | APTTYPEQUALIFIER aptQualifier;
39 | check_hresult(CoGetApartmentType(&aptType, &aptQualifier));
40 | return aptType;
41 | }
42 |
43 | void ClassMta::Apartment(int32_t /* value */)
44 | {
45 | throw hresult_not_implemented();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/Class.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ClassBoth.g.h"
4 | #include "ClassSta.g.h"
5 | #include "ClassMta.g.h"
6 |
7 | namespace winrt::TestComponent::implementation
8 | {
9 | struct ClassBoth : ClassBothT
10 | {
11 | ClassBoth() = default;
12 |
13 | int32_t Apartment();
14 | void Apartment(int32_t value);
15 | };
16 |
17 | struct ClassSta : ClassStaT
18 | {
19 | ClassSta() = default;
20 |
21 | int32_t Apartment();
22 | void Apartment(int32_t value);
23 | };
24 |
25 | struct ClassMta : ClassMtaT
26 | {
27 | ClassMta() = default;
28 |
29 | int32_t Apartment();
30 | void Apartment(int32_t value);
31 | };
32 | }
33 |
34 | namespace winrt::TestComponent::factory_implementation
35 | {
36 | struct ClassBoth : ClassBothT
37 | {
38 | };
39 |
40 | struct ClassSta : ClassStaT
41 | {
42 | };
43 |
44 | struct ClassMta : ClassMtaT
45 | {
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/Class.idl:
--------------------------------------------------------------------------------
1 | namespace TestComponent
2 | {
3 | [default_interface]
4 | runtimeclass ClassBoth
5 | {
6 | ClassBoth();
7 | Int32 Apartment;
8 | }
9 |
10 | [default_interface]
11 | runtimeclass ClassSta
12 | {
13 | ClassSta();
14 | Int32 Apartment;
15 | }
16 |
17 | [default_interface]
18 | runtimeclass ClassMta
19 | {
20 | ClassMta();
21 | Int32 Apartment;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/PropertySheet.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/TestComponent.def:
--------------------------------------------------------------------------------
1 | EXPORTS
2 | DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
3 | DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/TestComponent.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | accd3aa8-1ba0-4223-9bbe-0c431709210b
6 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms
7 |
8 |
9 | {926ab91d-31b4-48c3-b9a4-e681349f27f0}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/TestComponent/readme.txt:
--------------------------------------------------------------------------------
1 | ========================================================================
2 | C++/WinRT TestComponent Project Overview
3 | ========================================================================
4 |
5 | This project demonstrates how to get started authoring Windows Runtime
6 | classes directly with standard C++, using the C++/WinRT SDK component
7 | to generate implementation headers from interface (IDL) files. The
8 | generated Windows Runtime component binary and WinMD files should then
9 | be bundled with the Universal Windows Platform (UWP) app consuming them.
10 |
11 | Steps:
12 | 1. Create an interface (IDL) file to define your Windows Runtime class,
13 | its default interface, and any other interfaces it implements.
14 | 2. Build the project once to generate module.g.cpp, module.h.cpp, and
15 | implementation templates under the "Generated Files" folder, as
16 | well as skeleton class definitions under "Generated Files\sources".
17 | 3. Use the skeleton class definitions for reference to implement your
18 | Windows Runtime classes.
19 |
20 | ========================================================================
21 | Learn more about C++/WinRT here:
22 | http://aka.ms/cppwinrt/
23 | ========================================================================
24 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 |
20 | Source Files
21 |
22 |
23 |
24 |
25 |
26 | Source Files
27 |
28 |
29 | Source Files
30 |
31 |
32 | Header Files
33 |
34 |
35 | Source Files
36 |
37 |
38 |
39 |
40 | Header Files
41 |
42 |
43 | Header Files
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/catalog.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include "wil/result.h"
9 | #include "wil/resource.h"
10 |
11 | HRESULT LoadManifestFromPath(std::wstring path);
12 |
13 | HRESULT LoadFromSxSManifest(PCWSTR path);
14 |
15 | HRESULT LoadFromEmbeddedManifest(PCWSTR path);
16 |
17 | HRESULT WinRTLoadComponentFromFilePath(PCWSTR manifestPath);
18 |
19 | HRESULT WinRTLoadComponentFromString(std::string_view xmlStringValue);
20 |
21 | HRESULT ParseRootManifestFromXmlReaderInput(IUnknown* pInput);
22 |
23 | HRESULT ParseFileTag(Microsoft::WRL::ComPtr xmlReader);
24 |
25 | HRESULT ParseActivatableClassTag(Microsoft::WRL::ComPtr xmlReader, PCWSTR fileName);
26 |
27 | HRESULT WinRTGetThreadingModel(
28 | HSTRING activatableClassId,
29 | ABI::Windows::Foundation::ThreadingType* threading_model);
30 |
31 | HRESULT WinRTGetActivationFactory(
32 | HSTRING activatableClassId,
33 | REFIID iid,
34 | void** factory);
35 |
36 | HRESULT WinRTGetMetadataFile(
37 | const HSTRING name,
38 | IMetaDataDispenserEx* metaDataDispenser,
39 | HSTRING* metaDataFilePath,
40 | IMetaDataImport2** metaDataImport,
41 | mdTypeDef* typeDefToken);
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/cpp.hint:
--------------------------------------------------------------------------------
1 | #define UNDOCKEDREGFREEWINRT_API __declspec(dllexport)
2 | #define UNDOCKEDREGFREEWINRT_API __declspec(dllimport)
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/extwinrt.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | HRESULT WINAPI RegFreeWinRTInitializeForTest();
4 | HRESULT WINAPI RegFreeWinRTUninitializeForTest();
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/winrtact.def:
--------------------------------------------------------------------------------
1 | LIBRARY winrtact
2 |
3 | EXPORTS
4 | winrtact_Initialize
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTManagedTest/UndockedRegFreeWinRTManagedTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 | x64;x86
7 | true
8 |
9 |
10 |
11 | true
12 |
13 |
14 |
15 | true
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ..\_build\x86\Debug\TestComponent.winmd
31 | true
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/UndockedRegFreeWinRTTest.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 | Source Files
26 |
27 |
28 |
29 |
30 | Header Files
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/directory.build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | high
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/main.cpp:
--------------------------------------------------------------------------------
1 | #define CATCH_CONFIG_MAIN
2 | #include "..\Catch\catch.hpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "..\Catch\catch.hpp"
4 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/UndockedRegFreeWinRTTest/test_files/UndockedRegFreeWinRTTest.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
12 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/detours.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
6 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd
7 |
8 |
9 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
10 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | Header Files
28 |
29 |
30 | Header Files
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/detver.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////////////
2 | //
3 | // Common version parameters.
4 | //
5 | // Microsoft Research Detours Package, Version 4.0.1
6 | //
7 | // Copyright (c) Microsoft Corporation. All rights reserved.
8 | //
9 |
10 | #define _USING_V110_SDK71_ 1
11 | #include "winver.h"
12 | #if 0
13 | #include
14 | #include
15 | #else
16 | #ifndef DETOURS_STRINGIFY
17 | #define DETOURS_STRINGIFY(x) DETOURS_STRINGIFY_(x)
18 | #define DETOURS_STRINGIFY_(x) #x
19 | #endif
20 |
21 | #define VER_FILEFLAGSMASK 0x3fL
22 | #define VER_FILEFLAGS 0x0L
23 | #define VER_FILEOS 0x00040004L
24 | #define VER_FILETYPE 0x00000002L
25 | #define VER_FILESUBTYPE 0x00000000L
26 | #endif
27 | #define VER_DETOURS_BITS DETOUR_STRINGIFY(DETOURS_BITS)
28 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/disolarm.cpp:
--------------------------------------------------------------------------------
1 | #define DETOURS_ARM_OFFLINE_LIBRARY
2 | #include "disasm.cpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/disolarm64.cpp:
--------------------------------------------------------------------------------
1 | #define DETOURS_ARM64_OFFLINE_LIBRARY
2 | #include "disasm.cpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/disolia64.cpp:
--------------------------------------------------------------------------------
1 | #define DETOURS_IA64_OFFLINE_LIBRARY
2 | #include "disasm.cpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/disolx64.cpp:
--------------------------------------------------------------------------------
1 | #define DETOURS_X64_OFFLINE_LIBRARY
2 | #include "disasm.cpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/detours/disolx86.cpp:
--------------------------------------------------------------------------------
1 | #define DETOURS_X86_OFFLINE_LIBRARY
2 | #include "disasm.cpp"
3 |
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/mwinrtact/mwinrtact.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | namespace Microsoft.Windows
4 | {
5 | public static class UndockedRegFreeWinrt
6 | {
7 | [DllImport("winrtact.dll")]
8 | static extern void winrtact_Initialize();
9 |
10 | public static void Initialize()
11 | {
12 | winrtact_Initialize();
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/UndockedRegFreeWinRT/mwinrtact/mwinrtact.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/foundation/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | if (WIN32)
3 | add_custom_target(foundation_metadata
4 | COMMAND ilasm /DLL /mdv="WindowsRuntime 1.4" /output=${CMAKE_CURRENT_BINARY_DIR}/Foundation.xmeta ${CMAKE_CURRENT_SOURCE_DIR}/xlang_foundation.il
5 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/xlang_foundation.il
6 | BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/Foundation.xmeta
7 | )
8 | set_target_properties(foundation_metadata PROPERTIES
9 | Foundation_xmeta ${CMAKE_CURRENT_BINARY_DIR}/Foundation.xmeta
10 | )
11 | endif()
12 |
--------------------------------------------------------------------------------
/src/library/impl/base.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #if defined(_WIN32)
4 | #define XLANG_PLATFORM_WINDOWS 1
5 | #else
6 | #define XLANG_PLATFORM_WINDOWS 0
7 | #endif
8 |
9 | #if XLANG_PLATFORM_WINDOWS
10 | #include
11 | #include
12 | #include
13 | #else
14 | #include
15 | #include
16 | #include
17 | #include
18 | #endif
19 |
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include