mxc-sdk 1.0.1

Importable library for starting MXC sandboxes in-process, with streaming stdio.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! Windows API-set contract helpers.

use windows::Win32::System::WindowsProgramming::IsApiSetImplemented;
use windows_core::PCSTR;

/// Whether Windows implements the named API-set contract.
#[must_use]
pub fn is_api_set_implemented(name: &core::ffi::CStr) -> bool {
    // SAFETY: `CStr` guarantees that `name` is null-terminated.
    unsafe { IsApiSetImplemented(PCSTR(name.as_ptr().cast())).as_bool() }
}