HcsGetServiceProperties

Description

This function returns properties of the Host Compute System, see sample code.

Syntax

HRESULT WINAPI
HcsGetServiceProperties(
    _In_opt_ PCWSTR propertyQuery,
    _Outptr_ PWSTR* result
    );

Parameters

propertyQuery

Optional JSON document of Service_PropertyQuery specifying the properties to query.

result

On success, receives a JSON document of ServiceProperties with the requested properties.

On failure, it can optionally receive an error JSON document represented by a ResultError.

Return Values

The function returns HRESULT.

Remarks

On success, the result as ServiceProperties JSON document is an array of "Properties" of type Any. In JSON, Any means an arbitrary object with no restrictions. Refer to the following table to know what JSON type HCS expects for each GetPropertyType.

GetPropertyType Property type for result
"Basic" BasicInformation
"CpuGroup" CpuGroupConfigurations
"ProcessorTopology" processorTopology
"ContainerCredentialGuard" ContainerCredentialGuardSystemInfo
"QoSCapabilities" QoSCapabilities

Requirements

Parameter Description
Minimum supported client Windows 10, version 1809
Minimum supported server Windows Server 2019
Target Platform Windows
Header ComputeCore.h
Library ComputeCore.lib
Dll ComputeCore.dll