Should I edit the include headers? I've copied from Windows SDK.
From d952747ce2adfdd411d4a3a872d82fa3bb8aa60f Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbap...@gmail.com>
Date: Thu, 14 Mar 2019 21:29:14 +0530
Subject: [PATCH] include/wslapi.h: Add wslapi header file

Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com>
---
 mingw-w64-headers/include/wslapi.h | 54 ++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 mingw-w64-headers/include/wslapi.h

diff --git a/mingw-w64-headers/include/wslapi.h b/mingw-w64-headers/include/wslapi.h
new file mode 100644
index 00000000..631aaec5
--- /dev/null
+++ b/mingw-w64-headers/include/wslapi.h
@@ -0,0 +1,54 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _WSLAPI_H_
+#define _WSLAPI_H_
+
+#include <apiset.h>
+#include <apisetcconv.h>
+
+#ifdef _CONTRACT_GEN
+#include <nt.h>
+#include <ntrtl.h>
+#include <nturtl.h>
+#include <wtypes.h>
+#endif // _CONTRACT_GEN
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#pragma region Desktop Family or OneCore Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SERVER)
+
+BOOL WslIsDistributionRegistered(PCWSTR distributionName);
+HRESULT WslRegisterDistribution(PCWSTR distributionName, PCWSTR tarGzFilename);
+HRESULT WslUnregisterDistribution(PCWSTR distributionName);
+
+typedef enum _WSL_DISTRIBUTION_FLAGS
+{
+    WSL_DISTRIBUTION_FLAGS_NONE = 0x0,
+    WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP = 0x1,
+    WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH = 0x2,
+    WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING = 0x4
+} WSL_DISTRIBUTION_FLAGS;
+
+#define WSL_DISTRIBUTION_FLAGS_VALID (WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP | WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH | WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING)
+#define WSL_DISTRIBUTION_FLAGS_DEFAULT (WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP | WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH | WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING)
+
+
+HRESULT WslConfigureDistribution(PCWSTR distributionName, ULONG defaultUID, WSL_DISTRIBUTION_FLAGS wslDistributionFlags);
+HRESULT WslGetDistributionConfiguration(PCWSTR distributionName, ULONG* distributionVersion, ULONG* defaultUID, WSL_DISTRIBUTION_FLAGS* wslDistributionFlags, PSTR** defaultEnvironmentVariables, ULONG* defaultEnvironmentVariableCount);
+HRESULT WslLaunchInteractive(PCWSTR distributionName, PCWSTR command, BOOL useCurrentWorkingDirectory, DWORD* exitCode);
+HRESULT WslLaunch(PCWSTR distributionName, PCWSTR command, BOOL useCurrentWorkingDirectory, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, HANDLE* process);
+
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SERVER) */
+#pragma endregion
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _WSLAPI_H_
-- 
2.21.0

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to