├── .gitignore
├── Desktop
├── Bridge
│ ├── App
│ │ ├── App.vcxproj
│ │ ├── App.vcxproj.filters
│ │ ├── main.cpp
│ │ ├── pch.cpp
│ │ └── pch.h
│ ├── Bridge.sln
│ ├── Component
│ │ ├── Button.cpp
│ │ ├── Button.h
│ │ ├── Component.idl
│ │ ├── Component.vcxproj
│ │ ├── Component.vcxproj.filters
│ │ ├── Component_h.h
│ │ ├── module.def
│ │ ├── pch.cpp
│ │ └── pch.h
│ └── Package
│ │ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ │ ├── Package.appxmanifest
│ │ ├── Package.wapproj
│ │ └── Package_TemporaryKey.pfx
├── Component
│ ├── App
│ │ ├── App.vcxproj
│ │ ├── App.vcxproj.filters
│ │ ├── main.cpp
│ │ ├── pch.cpp
│ │ └── pch.h
│ ├── Component.sln
│ └── Component
│ │ ├── Button.cpp
│ │ ├── Button.h
│ │ ├── Component.idl
│ │ ├── Component.vcxproj
│ │ ├── Component.vcxproj.filters
│ │ ├── Component_h.h
│ │ ├── module.def
│ │ ├── pch.cpp
│ │ └── pch.h
├── DesktopComposition
│ ├── Desktop.cpp
│ ├── DesktopComposition.sln
│ ├── DesktopComposition.vcxproj
│ ├── pch.cpp
│ └── pch.h
├── Interop
│ ├── Interop.sln
│ ├── Interop.vcxproj
│ ├── Main.cpp
│ ├── pch.cpp
│ └── pch.h
├── Ocr
│ ├── Main.cpp
│ ├── Ocr.sln
│ ├── Ocr.vcxproj
│ ├── message.png
│ ├── pch.cpp
│ └── pch.h
└── Syndication
│ ├── Main.cpp
│ ├── Syndication.sln
│ ├── Syndication.vcxproj
│ ├── pch.cpp
│ └── pch.h
├── LICENSE
├── README.md
└── Store
├── Blocks
├── App.cpp
├── Assets
│ ├── Logo.scale-100.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ ├── StoreLogo.scale-100.png
│ └── WideLogo.scale-100.png
├── Blocks.sln
├── Blocks.vcxproj
├── Package.appxmanifest
├── pch.cpp
└── pch.h
├── Component
├── App
│ ├── App.cpp
│ ├── App.vcxproj
│ ├── App.vcxproj.filters
│ ├── Assets
│ │ ├── Logo.scale-100.png
│ │ ├── SmallLogo.scale-100.png
│ │ ├── SplashScreen.scale-100.png
│ │ ├── StoreLogo.scale-100.png
│ │ └── WideLogo.scale-100.png
│ ├── Package.appxmanifest
│ ├── pch.cpp
│ └── pch.h
├── Component.sln
└── Component
│ ├── Button.cpp
│ ├── Button.h
│ ├── Component.idl
│ ├── Component.vcxproj
│ ├── Component.vcxproj.filters
│ ├── Component_h.h
│ ├── module.def
│ ├── pch.cpp
│ └── pch.h
├── Direct2D
├── App.cpp
├── Assets
│ ├── Logo.scale-100.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ ├── StoreLogo.scale-100.png
│ └── WideLogo.scale-100.png
├── Direct2D.sln
├── Direct2D.vcxproj
├── Package.appxmanifest
├── pch.cpp
└── pch.h
├── Video
├── App.cpp
├── Assets
│ ├── Logo.scale-100.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ ├── StoreLogo.scale-100.png
│ └── WideLogo.scale-100.png
├── Package.appxmanifest
├── Video.sln
├── Video.vcxproj
├── Video.vcxproj.filters
├── pch.cpp
└── pch.h
├── XamlButton
├── App.cpp
├── Assets
│ ├── Logo.scale-100.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ ├── StoreLogo.scale-100.png
│ └── WideLogo.scale-100.png
├── Package.appxmanifest
├── XamlButton.sln
├── XamlButton.vcxproj
├── pch.cpp
└── pch.h
├── XamlCode
├── App.cpp
├── Assets
│ ├── Logo.scale-100.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ ├── StoreLogo.scale-100.png
│ └── WideLogo.scale-100.png
├── Message.png
├── Package.appxmanifest
├── XamlCode.sln
├── XamlCode.vcxproj
├── pch.cpp
└── pch.h
└── XamlWin2D
├── App.cpp
├── Assets
├── Logo.scale-100.png
├── SmallLogo.scale-100.png
├── SplashScreen.scale-100.png
├── StoreLogo.scale-100.png
└── WideLogo.scale-100.png
├── Package.appxmanifest
├── XamlWin2D.sln
├── XamlWin2D.vcxproj
├── XamlWin2D.vcxproj.filters
├── packages.config
├── pch.cpp
└── pch.h
/.gitignore:
--------------------------------------------------------------------------------
1 | .vs
2 | Debug
3 | Release
4 | Packages
5 | Generated Files
6 |
7 | *.dll
8 | *.winmd
9 | *.user
10 |
--------------------------------------------------------------------------------
/Desktop/Bridge/App/App.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 15.0
23 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}
24 | App
25 | 10.0.17069.0
26 |
27 |
28 |
29 | Application
30 | true
31 | v141
32 | MultiByte
33 |
34 |
35 | Application
36 | false
37 | v141
38 | true
39 | MultiByte
40 |
41 |
42 | Application
43 | true
44 | v141
45 | MultiByte
46 |
47 |
48 | Application
49 | false
50 | v141
51 | true
52 | MultiByte
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | Level4
76 | Disabled
77 | true
78 | Use
79 | pch.h
80 | stdcpp17
81 | /permissive- /await %(AdditionalOptions)
82 | ..\Component\Generated Files
83 |
84 |
85 | windowsapp.lib
86 |
87 |
88 |
89 |
90 | Level4
91 | Disabled
92 | true
93 | Use
94 | pch.h
95 | stdcpp17
96 | /permissive- /await %(AdditionalOptions)
97 | ..\Component\Generated Files
98 |
99 |
100 | windowsapp.lib
101 |
102 |
103 |
104 |
105 | Level4
106 | MaxSpeed
107 | true
108 | true
109 | true
110 | Use
111 | pch.h
112 | stdcpp17
113 | /permissive- /await %(AdditionalOptions)
114 | ..\Component\Generated Files
115 |
116 |
117 | true
118 | true
119 | windowsapp.lib
120 |
121 |
122 |
123 |
124 | Level4
125 | MaxSpeed
126 | true
127 | true
128 | true
129 | Use
130 | pch.h
131 | stdcpp17
132 | /permissive- /await %(AdditionalOptions)
133 | ..\Component\Generated Files
134 |
135 |
136 | true
137 | true
138 | windowsapp.lib
139 |
140 |
141 |
142 |
143 |
144 | Create
145 | Create
146 | Create
147 | Create
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 | {559a7cf4-dc5f-4d62-ba6b-0c2b025593f8}
156 |
157 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/Desktop/Bridge/App/App.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Desktop/Bridge/App/main.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
3 | using namespace winrt;
4 | using namespace Windows::Foundation;
5 | using namespace Component;
6 |
7 | int main()
8 | {
9 | init_apartment();
10 |
11 | puts("Desktop Bridge");
12 |
13 | // Call OS WinRT component:
14 | Uri uri(L"https://moderncpp.com/");
15 | printf("%ls\n", uri.Domain().c_str());
16 |
17 | try
18 | {
19 | // Call third party WinRT component:
20 | Button button;
21 | printf("%ls\n", button.Text().c_str());
22 | }
23 | catch (hresult_error const& e)
24 | {
25 | printf("You need to launch via the Package app. :)\n");
26 | printf("%ls\n", e.message().c_str());
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Desktop/Bridge/App/pch.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 |
--------------------------------------------------------------------------------
/Desktop/Bridge/App/pch.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "winrt/Component.h"
5 |
--------------------------------------------------------------------------------
/Desktop/Bridge/Bridge.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27004.2008
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "App", "App\App.vcxproj", "{3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}"
7 | ProjectSection(ProjectDependencies) = postProject
8 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8} = {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}
9 | EndProjectSection
10 | EndProject
11 | Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Package", "Package\Package.wapproj", "{3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}"
12 | EndProject
13 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Component", "Component\Component.vcxproj", "{559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}"
14 | EndProject
15 | Global
16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
17 | Debug|x64 = Debug|x64
18 | Debug|x86 = Debug|x86
19 | Release|x64 = Release|x64
20 | Release|x86 = Release|x86
21 | EndGlobalSection
22 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
23 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Debug|x64.ActiveCfg = Debug|x64
24 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Debug|x64.Build.0 = Debug|x64
25 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Debug|x86.ActiveCfg = Debug|Win32
26 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Debug|x86.Build.0 = Debug|Win32
27 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Release|x64.ActiveCfg = Release|x64
28 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Release|x64.Build.0 = Release|x64
29 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Release|x86.ActiveCfg = Release|Win32
30 | {3E09AE70-15F7-459A-97DB-7A9C7C95F8D3}.Release|x86.Build.0 = Release|Win32
31 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Debug|x64.ActiveCfg = Debug|x64
32 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Debug|x64.Build.0 = Debug|x64
33 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Debug|x64.Deploy.0 = Debug|x64
34 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Debug|x86.ActiveCfg = Debug|x86
35 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Debug|x86.Build.0 = Debug|x86
36 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Debug|x86.Deploy.0 = Debug|x86
37 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Release|x64.ActiveCfg = Release|x64
38 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Release|x64.Build.0 = Release|x64
39 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Release|x64.Deploy.0 = Release|x64
40 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Release|x86.ActiveCfg = Release|x86
41 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Release|x86.Build.0 = Release|x86
42 | {3C7AD84C-E7A6-4EBA-A5C0-A8A8C8ADB272}.Release|x86.Deploy.0 = Release|x86
43 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Debug|x64.ActiveCfg = Debug|x64
44 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Debug|x64.Build.0 = Debug|x64
45 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Debug|x86.ActiveCfg = Debug|Win32
46 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Debug|x86.Build.0 = Debug|Win32
47 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Release|x64.ActiveCfg = Release|x64
48 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Release|x64.Build.0 = Release|x64
49 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Release|x86.ActiveCfg = Release|Win32
50 | {559A7CF4-DC5F-4D62-BA6B-0C2B025593F8}.Release|x86.Build.0 = Release|Win32
51 | EndGlobalSection
52 | GlobalSection(SolutionProperties) = preSolution
53 | HideSolutionNode = FALSE
54 | EndGlobalSection
55 | GlobalSection(ExtensibilityGlobals) = postSolution
56 | SolutionGuid = {33861B78-F28B-45B7-BB04-63BE5885D9B1}
57 | EndGlobalSection
58 | EndGlobal
59 |
--------------------------------------------------------------------------------
/Desktop/Bridge/Component/Button.cpp:
--------------------------------------------------------------------------------
1 | #include "pch.h"
2 | #include "Button.h"
3 |
4 | namespace winrt::Component::implementation
5 | {
6 | hstring Button::Text()
7 | {
8 | return L"Button";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Desktop/Bridge/Component/Button.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Button.g.h"
4 |
5 | namespace winrt::Component::implementation
6 | {
7 | struct Button : ButtonT