winrt topic
Windows Runtime API
The Windows Runtime provides the latest generation of Windows APIs to apps running on Windows 8 or later. WinRT is an evolution of COM and the flat Win32 APIs that came before it, and is designed for projection into a variety of languages.
Properties
- isWindowsRuntimeAvailable → bool winrt
-
Returns
trueif the Windows Runtime (WinRT) is available on the current system.no setter
Functions
-
GetRestrictedErrorInfo(
) → IRestrictedErrorInfo? winrt - Gets the restricted error information object set by a previous call to SetRestrictedErrorInfo in the current logical thread.
-
RoActivateInstance(
HSTRING activatableClassId) → IInspectable? winrt - Activates the specified Windows Runtime class.
-
RoGetActivationFactory<
T extends IUnknown> (HSTRING activatableClassId) → T winrt - Gets the activation factory for the specified runtime class.
-
RoGetApartmentIdentifier(
) → int winrt - Gets a unique identifier for the current apartment.
-
RoGetMetaDataFile(
HSTRING name, IMetaDataDispenserEx? metaDataDispenser, Pointer< winrtPointer< ? metaDataFilePath, Pointer<NativeType> >VTablePointer> ? metaDataImport, Pointer<Uint32> ? typeDefToken) → void - Locates and retrieves the metadata file that describes the Application Binary Interface (ABI) for the specified typename.
-
RoInitialize(
RO_INIT_TYPE initType) → void winrt - Initializes the Windows Runtime on the current thread with the specified concurrency model.
-
RoIsApiContractMajorVersionPresent(
PCWSTR name, int majorVersion) → bool winrt - Returns true or false to indicate whether the API contract with the specified name and major version number is present.
-
RoIsApiContractPresent(
PCWSTR name, int majorVersion, int minorVersion) → bool winrt - Returns true or false to indicate whether the API contract with the specified name and major and minor version number is present.
-
RoUninitialize(
) → void winrt - Closes the Windows Runtime on the current thread.
-
WindowsCompareStringOrdinal(
HSTRING? string1, HSTRING? string2) → int winrt - Compares two specified HSTRING objects and returns an integer that indicates their relative position in a sort order.
-
WindowsConcatString(
HSTRING? string1, HSTRING? string2) → HSTRING winrt - Concatenates two specified strings.
-
WindowsCreateString(
PCWSTR? sourceString, int length) → HSTRING winrt - Creates a new HSTRING based on the specified source string.
-
WindowsDeleteString(
HSTRING? string) → void winrt - Decrements the reference count of a string buffer.
-
WindowsDeleteStringBuffer(
HSTRING_BUFFER? bufferHandle) → void winrt - Discards a preallocated string buffer if it was not promoted to an HSTRING.
-
WindowsDuplicateString(
HSTRING? string) → HSTRING winrt - Creates a copy of the specified string.
-
WindowsGetStringLen(
HSTRING? string) → int winrt - Gets the length, in Unicode characters, of the specified string.
-
WindowsGetStringRawBuffer(
HSTRING? string, Pointer< winrtUint32> ? length) → PCWSTR - Retrieves the backing buffer for the specified string.
-
WindowsIsStringEmpty(
HSTRING? string) → bool winrt - Indicates whether the specified string is the empty string.
-
WindowsPreallocateStringBuffer(
int length, Pointer< winrtPointer< charBuffer, Pointer<Uint16> >Pointer< bufferHandle) → voidNativeType> > - Allocates a mutable character buffer for use in HSTRING creation.
-
WindowsPromoteStringBuffer(
HSTRING_BUFFER bufferHandle) → HSTRING winrt - Creates an HSTRING from the specified HSTRING_BUFFER.
-
WindowsReplaceString(
HSTRING? string, HSTRING? stringReplaced, HSTRING? stringReplaceWith) → HSTRING winrt - Replaces all occurrences of a set of characters in the specified string with another set of characters to create a new string.
-
WindowsStringHasEmbeddedNull(
HSTRING? string) → bool winrt - Indicates whether the specified string has embedded null characters.
-
WindowsSubstring(
HSTRING? string, int startIndex) → HSTRING winrt - Retrieves a substring from the specified string.
-
WindowsSubstringWithSpecifiedLength(
HSTRING? string, int startIndex, int length) → HSTRING winrt - Retrieves a substring from the specified string.
-
WindowsTrimStringEnd(
HSTRING? string, HSTRING? trimString) → HSTRING winrt - Removes all trailing occurrences of a specified set of characters from the source string.
-
WindowsTrimStringStart(
HSTRING? string, HSTRING? trimString) → HSTRING winrt - Removes all leading occurrences of a specified set of characters from the source string.