Module bindings::windows[]

Modules

ai
application_model
data
devices
embedded
foundation
gaming
globalization
graphics
management
media
networking
perception
phone
security
services
storage
system
ui
web
win32

Macros

build

A macro for generating WinRT modules to a .rs file at build time.

include_bindings

Includes the generating bindings into the current context.

Structs

Array

A WinRT array stores elements contiguously in a heap-allocated buffer.

BOOL

A 32-bit boolean error code value returned by some Win32 functions.

BString

A Basic string, sometimes called a BSTR, is a string data type used by certain COM interfaces and interop functions.

CoString

A null-terminated wide-string that has been allocated with CoTaskMemAlloc or CoTaskMemRealloc and is freed with CoTaskMemFree.

ConstBuffer

A buffer of a constant size suitable for use in const contexts

Error

A WinRT error object consists of both an error code as well as detailed error information for debugging.

ErrorCode

A primitive error code value returned by most COM functions. An ErrorCode is sometimes called an HRESULT.

FactoryCache

Attempts to load and cache the factory interface for the given WinRT class. This is automatically

Guid

A globally unique identifier (GUID) used to identify COM and WinRT interfaces.

HString

A WinRT string, sometimes called an HSTRING, is reference-counted and logically immutable. It should only be used for communicating with WinRT APIs.

IActivationFactory

WinRT classes have a supporting factory object that implements IActivationFactory to create a new instance of the WinRT class with some default state. IActivationFactory represents the IActivationFactory interface.

IAgileObject

A marker interface indicating that an object is free-threaded and may be called from any apartment. IAgileObject represents the IAgileObject interface.

IUnknown

All COM interfaces (and thus WinRT classes and interfaces) implement IUnknown under the hood to provide reference-counted lifetime management as well as the ability to query for additional interfaces that the object may implement.

NOT_YET_SUPPORTED_TYPE

A stand-in for a type which is not yet fully supported by the windows crate.

Object

A WinRT object that may be used as a polymorphic stand-in for any WinRT class, interface, or boxed value. Object implements the IInspectable interface.

RefCount

A thread-safe reference count for use with COM implementations.

Waiter

A simple blocking waiter used by the generated bindings and should not be used directly.

Constants

FALSE

A BOOL representing false.

TRUE

A BOOL representing true.

Traits

Abi

Provides a generic way of referring to and converting between a Rust object and its ABI equivalent.

Interface

Provides low-level access to a COM interface.

RuntimeName

A WinRT type that can be identified by a name in order to support activation and marshaling.

RuntimeType

RuntimeType is used to constrain WinRT generic types to WinRT types.

Functions

create_instance

Creates a COM object with the given CLSID.

factory

Attempts to load the factory interface for the given WinRT class.

initialize_mta

Initializes COM for use by the calling thread for the multi-threaded apartment (MTA).

initialize_sta

Initializes COM for use by the calling thread for a single-threaded apartment (STA).

Type Definitions

Result

A Result type that provides Windows error information.

Attribute Macros

implement

Rust structs can use the implement macro to implement entire WinRT classes or any combination of existing COM and WinRT interfaces.