source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wslapi.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 1.8 KB
RevLine 
[1166]1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _WSLAPI_H_
7#define _WSLAPI_H_
8
9#include <apiset.h>
10#include <apisetcconv.h>
11#include <wtypes.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
18
19BOOL WslIsDistributionRegistered(PCWSTR distributionName);
20HRESULT WslRegisterDistribution(PCWSTR distributionName, PCWSTR tarGzFilename);
21HRESULT WslUnregisterDistribution(PCWSTR distributionName);
22
23typedef enum {
24 WSL_DISTRIBUTION_FLAGS_NONE = 0x0,
25 WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP = 0x1,
26 WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH = 0x2,
27 WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING = 0x4
28} WSL_DISTRIBUTION_FLAGS;
29
30#define WSL_DISTRIBUTION_FLAGS_VALID (WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP | WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH | WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING)
31#define WSL_DISTRIBUTION_FLAGS_DEFAULT (WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP | WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH | WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING)
32
33HRESULT WslConfigureDistribution(PCWSTR distributionName, ULONG defaultUID, WSL_DISTRIBUTION_FLAGS wslDistributionFlags);
34HRESULT WslGetDistributionConfiguration(PCWSTR distributionName, ULONG* distributionVersion, ULONG* defaultUID, WSL_DISTRIBUTION_FLAGS* wslDistributionFlags, PSTR** defaultEnvironmentVariables, ULONG* defaultEnvironmentVariableCount);
35HRESULT WslLaunchInteractive(PCWSTR distributionName, PCWSTR command, BOOL useCurrentWorkingDirectory, DWORD* exitCode);
36HRESULT WslLaunch(PCWSTR distributionName, PCWSTR command, BOOL useCurrentWorkingDirectory, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, HANDLE* process);
37
38#endif
39#ifdef __cplusplus
40}
41#endif
42#endif
Note: See TracBrowser for help on using the repository browser.