| 1 | /*++ |
| 2 | |
| 3 | Copyright (c) Microsoft. All rights reserved. |
| 4 | |
| 5 | Module Name: |
| 6 | |
| 7 | precomp.h |
| 8 | |
| 9 | Abstract: |
| 10 | |
| 11 | The precompiled header for common. |
| 12 | |
| 13 | --*/ |
| 14 | |
| 15 | #pragma warning(disable : 4200 4214 4875) |
| 16 | |
| 17 | #ifdef __cplusplus |
| 18 | #define _WINSOCKAPI_ |
| 19 | |
| 20 | // System headers |
| 21 | #include <windows.h> |
| 22 | #include <winapifamily.h> |
| 23 | #include <wincon.h> |
| 24 | #include <initguid.h> |
| 25 | #include <sddl.h> |
| 26 | #include <winsock2.h> |
| 27 | #include <ws2ipdef.h> |
| 28 | #include <ws2spi.h> |
| 29 | #include <wdk.h> |
| 30 | #include <FileApi.h> |
| 31 | #include <userenv.h> |
| 32 | #include <appmodel.h> |
| 33 | #include <virtdisk.h> |
| 34 | #include <conio.h> |
| 35 | #include <VersionHelpers.h> |
| 36 | #include <KnownFolders.h> |
| 37 | #include <shtypes.h> |
| 38 | #include <Shlwapi.h> |
| 39 | #include <Shlobj.h> |
| 40 | #include <icu.h> |
| 41 | #define ENABLE_INTSAFE_SIGNED_FUNCTIONS |
| 42 | #include <intsafe.h> |
| 43 | #include <safeint.h> |
| 44 | #include <windns.h> |
| 45 | #include <ipifcons.h> |
| 46 | #include <iphlpapi.h> |
| 47 | #include <netioapi.h> |
| 48 | #include <ip2string.h> |
| 49 | #include <atlsafe.h> // Note: needs to be included before tchar.h |
| 50 | #include <SoftPub.h> |
| 51 | #include <wintrust.h> |
| 52 | #include <msi.h> |
| 53 | #include <AccCtrl.h> |
| 54 | #include <AclAPI.h> |
| 55 | #include <wuapi.h> |
| 56 | #include "windowsdefs.h" |
| 57 | |
| 58 | // Annotations |
| 59 | #include <sal.h> |
| 60 | |
| 61 | // Standard library C-style |
| 62 | #include <wchar.h> |
| 63 | #include <stdlib.h> |
| 64 | #include <stdio.h> |
| 65 | #include <fcntl.h> |
| 66 | #include <io.h> |
| 67 | #include <time.h> |
| 68 | |
| 69 | // Standard library C++ style |
| 70 | #include <string> |
| 71 | #include <array> |
| 72 | #include <xstring> |
| 73 | #include <algorithm> |
| 74 | #include <map> |
| 75 | #include <memory> |
| 76 | #include <vector> |
| 77 | #include <locale> |
| 78 | #include <fstream> |
| 79 | #include <streambuf> |
| 80 | #include <string_view> |
| 81 | #include <thread> |
| 82 | #include <bitset> |
| 83 | #include <sstream> |
| 84 | #include <optional> |
| 85 | #include <filesystem> |
| 86 | #include <mutex> |
| 87 | #include <chrono> |
| 88 | #include <codecvt> |
| 89 | #include <random> |
| 90 | #include <future> |
| 91 | #include <unordered_set> |
| 92 | #include <queue> |
| 93 | #include <numeric> |
| 94 | #include <regex> |
| 95 | #include <source_location> |
| 96 | #include <ranges> |
| 97 | #include <format> |
| 98 | #include <cwctype> |
| 99 | #include <variant> |
| 100 | #include <bit> |
| 101 | |
| 102 | // Socket APIs |
| 103 | #include <mswsock.h> |
| 104 | #include <ws2tcpip.h> |
| 105 | #include <hvsocket.h> |
| 106 | #include <wininet.h> |
| 107 | #include <mstcpip.h> |
| 108 | |
| 109 | // Windows Internal Library |
| 110 | #include <wil/resource.h> |
| 111 | #include <wil/result.h> |
| 112 | #include <wil/filesystem.h> |
| 113 | #include <wil/token_helpers.h> |
| 114 | #include <wil/stl.h> |
| 115 | #include <wil/cppwinrt.h> |
| 116 | #include <wil/winrt.h> |
| 117 | #include <wil/wrl.h> |
| 118 | #include <wil/registry.h> |
| 119 | |
| 120 | // Winrt headers |
| 121 | #include <winrt/Windows.Foundation.h> |
| 122 | #include <winrt/Windows.Foundation.Collections.h> |
| 123 | #include <winrt/Windows.ApplicationModel.h> |
| 124 | #include <winrt/Windows.ApplicationModel.Core.h> |
| 125 | #include <winrt/Windows.Management.Deployment.h> |
| 126 | #include <winrt/Windows.Storage.Streams.h> |
| 127 | #include <winrt/Windows.Web.Http.h> |
| 128 | #include <winrt/windows.web.Http.Filters.h> |
| 129 | #include <winrt/Windows.Web.Http.Headers.h> |
| 130 | #include <winrt/Windows.ApplicationModel.Store.Preview.InstallControl.h> |
| 131 | #include <winrt/Windows.Services.Store.h> |
| 132 | #include <winrt/Windows.Storage.h> |
| 133 | |
| 134 | // Safe path handling |
| 135 | #include <pathcch.h> |
| 136 | |
| 137 | // Telemetry Header |
| 138 | #include "WslTelemetry.h" |
| 139 | #include "SlowOperationWatcher.h" |
| 140 | |
| 141 | // LxCore headers |
| 142 | #include <lxcoreapi.h> |
| 143 | #include <lxbusapi.h> |
| 144 | |
| 145 | // Utility/helper functions |
| 146 | #include "COMImplClass.h" |
| 147 | #include "conncheckshared.h" |
| 148 | #include "helpers.hpp" |
| 149 | #include "string.hpp" |
| 150 | #include "timestamp.hpp" |
| 151 | #include "filesystem.hpp" |
| 152 | #include "Localization.h" |
| 153 | #include "wslutil.h" |
| 154 | #include "gslhelpers.h" |
| 155 | #include "socket.hpp" |
| 156 | #include "defs.h" |
| 157 | #include "configfile.h" |
| 158 | #include "socketshared.h" |
| 159 | #include "stringshared.h" |
| 160 | #include "retryshared.h" |
| 161 | #include "wslconfig.h" |
| 162 | #include "Redirector.h" |
| 163 | #include "hvsocket.hpp" |
| 164 | #include "registry.hpp" |
| 165 | #include "LxssDynamicFunction.h" |
| 166 | #include "relay.hpp" |
| 167 | #include "svccomm.hpp" |
| 168 | #include "ConsoleState.h" |
| 169 | #include "disk.hpp" |
| 170 | #include "WslSecurity.h" |
| 171 | #include "ExecutionContext.h" |
| 172 | #include "WslClient.h" |
| 173 | #include "wslsupport.h" |
| 174 | #include <wslservice.h> |
| 175 | #include "message.h" |
| 176 | #include "wslpolicies.h" |
| 177 | #include "SubProcess.h" |
| 178 | #include "notifications.h" |
| 179 | #include "SocketChannel.h" |
| 180 | #include "interop.hpp" |
| 181 | #include "lxssbusclient.h" |
| 182 | #include "lxssclient.h" |
| 183 | #include "lxinitshared.h" |
| 184 | #include "wslhost.h" |
| 185 | #include "wslrelay.h" |
| 186 | #include "wsl.h" |
| 187 | #include "LxssPort.h" |
| 188 | |
| 189 | #endif |